Cleanup P_CURPROC and P_CP_RELEASED handling. P_CP_RELEASED prevents the
userland scheduler from messing with a process and must be set (in a lazy
fashion) when a thread that came in from userland is about to block in
the kernel. P_CURPROC is used to manage which threads belonging to
processes controlled by the userland scheduler are scheduled by LWKT.
The userland scheduler has also been streamlined considerably.
p_priority now has a rollup priority that can be compared directly,
regardless of the realtime/idle/whatever queue a process is on.
p_priority has been changed from an unsigned char to a signed short.
schedclock is now distributed, so 'top' shows the correct values.
A huge amount of cpu affinity code has been added to the scheduler. It is
not working 100% yet, but the framework is there (see kern/kern_switch.c).
globaldata now has gd_upri to support remote reschedule requests issued
by the affinity code. There are two goals to the new scheduling code for
MP boxes: (1) so niced/idleprio cpu bound programs do not interfere
*at* *all* with other things (like, say, a buildworld). (2) to reduce
the flip-flopping of processes between cpus.
lwkt_gettoken() now increments the generation number unconditionally so
kernel code can detect when other processes have used a token.
lwkt_send_ipiq_mask() removes stopped cpus from the mask automatically.