Re: IOCommandGate commandSleep/commandWakeup
Re: IOCommandGate commandSleep/commandWakeup
- Subject: Re: IOCommandGate commandSleep/commandWakeup
- From: Michael Smith <email@hidden>
- Date: Thu, 13 Dec 2007 19:11:26 -0800
On Dec 13, 2007, at 11:23 AM, Eric Long wrote:
kr = driver->myCommandGate->commandSleep(&(driver-
>isSleeping), THREAD_ABORTSAFE);
THREAD_ABORTSAFE means that it is safe to abort this thread while it
is asleep, in which case it will never return.
You probably want THREAD_UNINT.
If you are certain that you can tear down your operation while it is
in progress, you might consider THREAD_INTERRUPTIBLE, but you will
have to handle the THREAD_INTERRUPTED return case as well, and the
fact that you may be racing with whatever is responsible for waking
you up "normally".
= Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden