Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jun 2008 10:49:26 -0700
From:      "Murty, Ravi" <ravi.murty@intel.com>
To:        <freebsd-hackers@freebsd.org>
Subject:   TD_ON_RUNQ()
Message-ID:  <AEBCFC23C0E40949B10BA2C224FC61B00777EB8F@orsmsx416.amr.corp.intel.com>

next in thread | raw e-mail | index | archive | help
Hello Everybody,

=20

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.

=20

Thanks
Ravi

=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AEBCFC23C0E40949B10BA2C224FC61B00777EB8F>