| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
_______________________________________________
On May 17, 2004, at 2:56 PM, Peter Lovell wrote:
Hi folks,
I notice that Darwin and Mac OS X doesn't implement Posix memory-based semaphores, but only named semaphores. That is, you can use sem_open but not sem_init (which returns ENOSYS).
Can anyone shed any light on why this is so??
Thanks.....Peter
On May 17, 2004, at 4:13 PM, David Leimbach wrote:
Perhaps because they have similar functionality in the mach_semaphore libraries?
I don't know why either. I filed a bug about this and it's stil "Open for review".
Hhmmm. Interesting. I wonder just what's to review? I would prefer to use Posix semaphores for reasons of code portability, and stay away from dependencies on mach. Named Posix semaphores will get the job done -- it's just that you have to avoid name collisions with multiple processes etc etc.
I'm not complaining about named ones -- if you were only doing one or other this would certainly be the better choice. I'm just puzzled that, having done the harder one (named), the easier one (memory) isn't there.
On May 17, 2004, at 4:20 PM, Dario wrote:you can use semget, semctl, semop.
sorry but I have never used named semaphores
True. But these are System V semaphores, and I'd prefer to avoid them for the same reason I'm not using mach semaphores.
Thanks for the comments.....Peter
| References: | |
| >stabs common symbols relocation (From: Jonas Maebe <email@hidden>) | |
| >semaphores in Darwin (From: Peter Lovell <email@hidden>) | |
| >Re: semaphores in Darwin (From: David Leimbach <email@hidden>) | |
| >Re(4): semaphores in Darwin (From: Peter Lovell <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.