Add lwkt_setcpu_self(), a function which migrates the current thread to
authorMatthew Dillon <dillon@dragonflybsd.org>
Fri, 28 May 2004 08:37:34 +0000 (08:37 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Fri, 28 May 2004 08:37:34 +0000 (08:37 +0000)
commit5d21b981883b5769968b264791535d35ccbf379c
tree7b7ba3d70df4443397380fcbd2164694cf187b60
parent7160572f9a60c1f7374f8c240874ae522226bbca
Add lwkt_setcpu_self(), a function which migrates the current thread to
the specified cpu.  This will soon be used by sysctl_kern_proc() to
collect thread information across all available cpus (because it is only
legal to manipulate a thread on the cpu it belongs to).

Yes, you heard that right and, yes, the overhead is nasty... one whole
microsecond per cpu at least, possibly even two.  But who cares for
something like 'ps'?

In-conversation-with: Hiten Pandya <hmp@freebsd.org>
sys/kern/lwkt_thread.c
sys/sys/thread.h