• 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
Re: Using MIG RPC between 2 threads inside a process
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using MIG RPC between 2 threads inside a process


  • Subject: Re: Using MIG RPC between 2 threads inside a process
  • From: Paul Forgey <email@hidden>
  • Date: Thu, 16 Sep 2004 16:52:12 -0700

If you only have one consumer, there is a way to do this without a mutex in a realtime thread.

Check out Claudio Taglienti "Thread-Safe Circular Queue", C/C++ Users Journal 22(6), June 2004.

On Sep 16, 2004, at 4:02 PM, Godfrey van der Linden wrote:

Priority inversions are always a problem, I didn't realise you were talking about a "real-time" thread. All I can say is that this technique has a good probability of success 'cause the lock is only held for very, very short periods AND when we get priority handoff working out in user land it will definitely be presented through the pthread_mutex. (This is not a promise, I do not work in that part of Apple that would implement this API, I'm just making a guess based on the in kernel capabilities of mutex_lock())

If you need TRUE priority hand-off between a pair of thread then you will need kernel support and you will have to pay the cost of a kernel transition for every attempt to take a lock, this is probably not desirable either, though that is basically the mach_ipc solution.

Godfrey

_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Using MIG RPC between 2 threads inside a process (From: Stéphane Letz <email@hidden>)
 >Re: Using MIG RPC between 2 threads inside a process (From: Jim Magee <email@hidden>)
 >Re: Using MIG RPC between 2 threads inside a process (From: Stéphane Letz <email@hidden>)
 >Re: Using MIG RPC between 2 threads inside a process (From: Godfrey van der Linden <email@hidden>)
 >Re: Using MIG RPC between 2 threads inside a process (From: Stéphane Letz <email@hidden>)
 >Re: Using MIG RPC between 2 threads inside a process (From: Godfrey van der Linden <email@hidden>)
 >Re: Using MIG RPC between 2 threads inside a process (From: Godfrey van der Linden <email@hidden>)

  • Prev by Date: Re: AFS / CodaFS on Panther?
  • Next by Date: Re: Using MIG RPC between 2 threads inside a process
  • Previous by thread: Re: Using MIG RPC between 2 threads inside a process
  • Next by thread: Using MIG RPC between 2 threads inside a process
  • Index(es):
    • Date
    • Thread