Re: waiting queue
Re: waiting queue
- Subject: Re: waiting queue
- From: Jim Magee <email@hidden>
- Date: Fri, 8 Dec 2006 11:24:13 -0800
On Dec 6, 2006, at 1:37 AM, Quinn wrote:
At 11:11 -0800 5/12/06, Michael Smith wrote:
As a general rule, if you believe that your hardware is reliable,
use THREAD_UNINT to be safe.
There's one gotcha here. Because of the way user clients are
implementation, you shouldn't use THREAD_UNINT while blocking in a
user client if that user client has wired down any memory from the
client process. If you do so, there will be no way to kill the
task. I've included the gory details below. This was on 10.3.x, so
YMMV on later systems.
Yes. You may only user THREAD_UNINT is you are "guaranteed" that the
block is of a bounded duration. I put the guaranteed in quotes,
because nothing is certain in this life. But if there is any
(reasonable) likelihood that it might not get woken up (known flakey
hardware, or user-removable device with no wakeup, etc...) then you
either need to make the wait THREAD_INTERRUPTIBLE or set a timer for
the wait.
Oops, I guess I forgot to mention that in the previous note. All
waits, even THREAD_UNINT waits, will return/call their continuation on
wait timeout.
--Jim
_______________________________________________
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