Re: Using MIG RPC between 2 threads inside a process
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