site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Dec 6, 2006, at 1:37 AM, Quinn wrote: --Jim _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... 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. This email sent to site_archiver@lists.apple.com
participants (1)
-
Jim Magee