TDQ_LOCKPTR
THREAD_LOCKPTR_ASSERT(td, TDQ_LOCKPTR(from));
td->td_lock = TDQ_LOCKPTR(to);
if (td->td_lock == TDQ_LOCKPTR(tdq)) {
thread_lock_unblock(td, TDQ_LOCKPTR(tdq));
thread0.td_lock = TDQ_LOCKPTR(tdq);
PCPU_GET(idlethread)->td_lock = TDQ_LOCKPTR(TDQ_SELF());
return (TDQ_LOCKPTR(tdn));
MPASS(mtx == TDQ_LOCKPTR(tdq));
MPASS(mtx == TDQ_LOCKPTR(tdq));
if (mtx != TDQ_LOCKPTR(tdq)) {
child->td_lock = TDQ_LOCKPTR(tdq);
if (td->td_lock != TDQ_LOCKPTR(tdq)) {
td->td_lock = TDQ_LOCKPTR(tdq);
thread_lock_set(td, TDQ_LOCKPTR(tdq));
MPASS(td->td_lock == TDQ_LOCKPTR(tdq));
THREAD_LOCKPTR_ASSERT(curthread, TDQ_LOCKPTR(tdq));
THREAD_LOCKPTR_ASSERT(td, TDQ_LOCKPTR(tdq));
cpu_switch(td, newtd, TDQ_LOCKPTR(tdq));
MPASS(td->td_lock == TDQ_LOCKPTR(tdq));
#define TDQ_LOCK_ASSERT(t, type) mtx_assert(TDQ_LOCKPTR((t)), (type))
#define TDQ_LOCK(t) mtx_lock_spin(TDQ_LOCKPTR((t)))
#define TDQ_LOCK_FLAGS(t, f) mtx_lock_spin_flags(TDQ_LOCKPTR((t)), (f))
#define TDQ_TRYLOCK(t) mtx_trylock_spin(TDQ_LOCKPTR((t)))
#define TDQ_TRYLOCK_FLAGS(t, f) mtx_trylock_spin_flags(TDQ_LOCKPTR((t)), (f))
#define TDQ_UNLOCK(t) mtx_unlock_spin(TDQ_LOCKPTR((t)))
printf("\tlock %p\n", TDQ_LOCKPTR(tdq));
if (td->td_lock == TDQ_LOCKPTR(tdq) &&