TD_ON_RUNQ()

Murty, Ravi ravi.murty at intel.com
Mon Jun 16 18:17:41 UTC 2008


Hello Everybody,

 

This is a basic question - I've noticed this code in the kernel and
sched_4bsd.c which basically says assert that I am running on that I am
not on the runq.

For instance, in mi_switch() (kern_sync.c) there is an assert
KASSERT(!TD_ON_RUNQ(td), ("mi_switch: called by old code")). I guess if
mi_switch is being called for curthread, it must be running which means
it can't be on the runq, but I don't understand the assert string.
Similarly in sched_4bsd.c in function sched_bind, the assertion says
"assert that this thread is running" - and I've seen this assert happen.

 

Thanks
Ravi

 



More information about the freebsd-hackers mailing list