• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
multiple threads mutex, unlocking order
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

multiple threads mutex, unlocking order


  • Subject: multiple threads mutex, unlocking order
  • From: Matt Connolly <email@hidden>
  • Date: Mon, 16 Jun 2008 16:09:39 +0100
  • Domainkey-status: no signature

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.

Kernel thread #1 goes:

1. enqueue data to user-space process
2. call lock on mutex (already locked, so blocks).

user-space process goes:
1. receive notification via data queue
2. notify kernel that we've processed the message - calling via IOUserClient connection


Kernel thread #2
1. gets message from IOUserClient subclass,
2. calls IOLockUnlock on the mutex, to wake up thread #1.



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.


-Matt

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: multiple threads mutex, unlocking order
      • From: Michael Smith <email@hidden>
  • Prev by Date: Re: UDP kernel sockets
  • Next by Date: Re: multiple threads mutex, unlocking order
  • Previous by thread: Re: UDP kernel sockets
  • Next by thread: Re: multiple threads mutex, unlocking order
  • Index(es):
    • Date
    • Thread