site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On 8-Aug-2007, at 19:49, JanakiRam wrote: Hi ALL, Which one is prefered for which scenario. SysV semaphores are supported by the vast majority of Unix-like systems Mo. _______________________________________________ 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... I'm new to the semaphores and their implementations in Mac. Can any one clarify my following question(s). i) I've seen that there are three implementations of Semaphores i.e a) POSIX b) System V c) Mach Semaphores. ii) Whats the difference between Mach Semaphores and POSIX Semaphores. Mach semaphores are (I believe) primarily a kernel to user-space synchronisation primitive: the semaphore_create() and semaphore_destroy() primitives aren't callable from user-space tasks. On the other hand, SysV and POSIX semaphores aren't suitable for use in-kernel. The reference for Mach semaphores on Mac OS X can be found at http:// developer.apple.com/DOCUMENTATION/Darwin/Conceptual/KernelProgramming/ synchronization/chapter_15_section_2.html POSIX semaphores—I'm assuming you mean sem_open() et al, which are more properly POSIX Realtime Extension Semaphores, are available on those systems supporting them, which is a distinct subset of those supporting SysV semaphores. On conformant systems, the semantics of both SysV and POSIX realtime semaphores are as well-defined as anything else. This email sent to site_archiver@lists.apple.com
participants (1)
-
Mo McRoberts