Argh. kthread_suspend() when in P_KTHREAD context, tsleep() when not,
not the other way around.
This commit is contained in:
parent
8e310f4646
commit
e21ffdf2ef
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user