site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Thread-index: AcoyV3zAGunxDEg1NkqhI/S8nmLGTQ== Thread-topic: Thread sleep User-agent: Microsoft-Entourage/12.20.0.090605 Hi, I have a kext that sends data to a daemon via an IODataQueue. The daemon processes the data and sends back a response to my IOUserClient. The thread that enqueues the data must have the response or time-out before continuing. The response obviously comes on a separate thread. Ideally, the enque thread will go to sleep and be woken up by the response handler. The problem is there is a window for a race condition between when the enque thread is actually asleep and when the response arrives and the handler wants to wake it up. This leaves the potential that the thread is not asleep and therefore not ready to be woken up. The thread primitives that might allow me to check if the thread is sleeping are not exposed in the kpi. Anyone with advice on how to reconcile this? Eric _______________________________________________ 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
participants (1)
-
Eric Long