multiple threads mutex, unlocking order
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=soundevolution.com.au; h=Received:Message-Id:From:To:Content-Type:Mime-Version:Subject:Date:X-Mailer:X-Identified-User:DomainKey-Status; b=ZDGz8fFrqKB0X8x5yZDXStYNhtLV/XIbueCu0EznXcnEALEmS5WOCxIZLgG6gKDZJEcWnXTXc5/NSzjM9S8yl2qpc9gD4Xf8hFnFwfcgFAusahSRzp0D9gxvnW7ERFsq; Domainkey-status: no signature Kernel thread #1 goes: 1. enqueue data to user-space process 2. call lock on mutex (already locked, so blocks). Kernel thread #2 1. gets message from IOUserClient subclass, 2. calls IOLockUnlock on the mutex, to wake up thread #1. -Matt _______________________________________________ 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 Do the IOLock lock and unlock routines have to be called from the same thread? If multiple threads are waiting on the IOLock, are they executed in the order that they began waiting on the Lock? I'm looking for a way for a kernel task to wait for a user space process to respond to a message. user-space process goes: 1. receive notification via data queue 2. notify kernel that we've processed the message - calling via IOUserClient connection Basically, I want to serialise things, so that if there are multiple kernel threads sending to the user-space process, that they will have their information processed, and be woken from their locks in the correct order. smime.p7s
participants (1)
-
Matt Connolly