Re: Using MIG RPC between 2 threads inside a process
site_archiver@lists.apple.com Delivered-To: Darwin-dev@lists.apple.com On Sep 16, 2004, at 4:02 PM, Godfrey van der Linden wrote: _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... 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. 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 This email sent to site_archiver@lists.apple.com
participants (1)
-
Paul Forgey