Argh. kthread_suspend() when in P_KTHREAD context, tsleep() when not,

not the other way around.
This commit is contained in:
Bill Paul 2004-02-07 23:47:10 +00:00
parent 8e310f4646
commit e21ffdf2ef

View File

@ -1969,9 +1969,9 @@ ndis_wait_event(event, msecs)
mtx_pool_unlock(ndis_mtxpool, ntoskrnl_dispatchlock);
if (td->td_proc->p_flag & P_KTHREAD)
error = tsleep(td, PPAUSE|PCATCH, "ndiswe", tvtohz(&tv));
else
error = kthread_suspend(td->td_proc, tvtohz(&tv));
else
error = tsleep(td, PPAUSE|PCATCH, "ndiswe", tvtohz(&tv));
mtx_pool_lock(ndis_mtxpool, ntoskrnl_dispatchlock);