and use appropriately
- create more helper macros:
. cdev__xyz_init(c,n), such as cdev__ocri_init() for
/* open, close, read, ioctl */, etc.
. cdev__xRy_init(c,n), where nullop is used instead of enodev to dummy out
method `R' and the comments now read /* xxx (read) yyy */ instead
. cdev__xyz_t_init(c,n,t) - as per cdev__xyz_init, but sets d_type = t
as well
- use seltrue instead of dev_noimpl(poll,*), as (IIRC) cdevsw.d_poll should
always DTRT WRT returning a valid result. (a few devices previously
incorrectly returned ENODEV)
- use dev_noimpl(stop,enodev) instead of dev_noimpl(stop,nullop) if tty
== 0, because it doesn't matter if dev_type_stop isn't implemented in that
case, and it allows the use of the cdev__xyz_init macros. certain ports
(sparc,sparc64,x68k) used the nullop method for dev_type_stop in a few
drivers, whereas everything else uses enodev
- ensure that the comments are accurate WRT the behaviour of a given entry
and add comments to describe exactly what they do (because it's
not totally obvious at a glance, due to the number juggling necessary
to frob the correct bits in SR):
CLI -> EXCEPT_DISABLE (sets SR.BL)
STI -> EXCEPT_ENABLE (clears SR.BL)
ECLI -> INTR_DISABLE (sets SR.I[0-3])
ESTI -> INTR_ENABLE (clears SR.I[0-3])
* put #includes of opt headers and headers to get protos used by
net/netisr_dispatch.h in net/netisr.h (if !defined(_LOCORE)) (rather than
in netisr_dispatch.h itself, and potentially nowhere, respectively).
* require netisr.h to be included before netisr_dispatch.h.
* minor additional cleanup of both netisr.h and netisr_dispatch.h.
* clean up uses to remove now-unnecessary header file inclusions, and
local prototypes of the fns.
* convert netisr dispatch implementations which didn't use
netisr_dispatch.h (pc532) to use it.
- for sizeof(void *) == 8 arch, this is mandatory. MHLEN is too small
already (less than 80) and there are chances for unwanted packet loss due
to m_pullup restriction.
- for other cases, the change should avoid allocating clusters in most cases
(even when you have IPv4 IPsec tunnel, or IPv6 with moderate amount of
extension header)
portmasters: if your arch chokes with the change (high memory usage or
whatever), please backout the change for your arch.
<vm/pglist.h> -> <uvm/uvm_pglist.h>
<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
<vm/vm_object.h> -> nothing
<vm/vm_pager.h> -> into <uvm/uvm_pager.h>
also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
state into global and per-CPU scheduler state:
- Global state: sched_qs (run queues), sched_whichqs (bitmap
of non-empty run queues), sched_slpque (sleep queues).
NOTE: These may collectively move into a struct schedstate
at some point in the future.
- Per-CPU state, struct schedstate_percpu: spc_runtime
(time process on this CPU started running), spc_flags
(replaces struct proc's p_schedflags), and
spc_curpriority (usrpri of processes on this CPU).
- Every platform must now supply a struct cpu_info and
a curcpu() macro. Simplify existing cpu_info declarations
where appropriate.
- All references to per-CPU scheduler state now made through
curcpu(). NOTE: this will likely be adjusted in the future
after further changes to struct proc are made.
Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
which indicates that the process is actually running on a
processor. Test against SONPROC as appropriate rather than
combinations of SRUN and curproc. Update all context switch code
to properly set SONPROC when the process becomes the current
process on the CPU.
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED. These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case). Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.
These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.