site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Thu, 31 Jul 2008, St??phane Sudre wrote: Typo: http://developer.apple.com/documentation/Darwin/Conceptual/KernelProgramming... "you should with either use wait_queue functions or use" -> with--; Question: Does it: - wake up all the sleeping "threads" at once? or - wake up only one sleeping thread? Normally wakes up all threads sleeping on that event at the time of the wake up call. (A common practice is to put the msleep() in a loop checking for the condition it is sleeping for. ie. Using "while(..) msleep();" instead of "if(...) msleep();". This does result in threads waking up and then going back to sleep, so if you can use separate events easily, that could be more efficient.) Have fun with it, rick ps: I remember spotting the same typo, so that doc is getting read;-) _______________________________________________ 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... This email sent to site_archiver@lists.apple.com Let's say you are in a re-entrant callback and you make a call to msleep(void * channel, ...) on multiple calls with the same channel and you then issue a wakeup(void * channel) call.