site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=VCuiFb7u1s1y3C3SNS9GbUI+vmLL/Q43lXoO+xUdicg=; b=QjBKCsm/0aI1UOzQW4U+SjVaCz+EOn/Qd9HWUjnlmdXMuTG+Du/1DT5EmzuuryZuLc /4Gvv4VoKDxvMSpb0tnjUcmVYykQjQtej/yw0Lx3wHLdwd/9rOkOIy1VUccmDitkq2LV YKW1Q7pAFgvkS9cu1ndmQX0KXWKsumAHfHKgY= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=UMQuHq4T0tFFTyEapcnzJT13kUBofGard4kCAl3/NPlGzqGM7nLySjBCvtXjqa+Qu7 d01PXbAa17KKFM1VBNQp0pIW1eXx/aV2YBYlXSqAy9V882XPWbX2YifSqsanKIf8AF9h 99T/y85MuBCCye1i3WL9UdF4IsiRc7MI2cQMo= Thanks. Now I am using following set of APIs: ftok() semget() semop() semctl() It is working till now :) Regards rksinghal On Thu, Nov 27, 2008 at 9:49 AM, Terry Lambert <tlambert@apple.com> wrote:
On Nov 26, 2008, at 7:31 PM, Rakesh Singhal wrote:
Hi all
I tried to use sem_init() but I think it is not there to use. It is declared in semaphore.h but when I do man sem_init() then it gives the message "No manual entry for sem_init".
Now, I am using sem_open(). I think it is right API to create unique semaphore between multi-processes. But creating it in one process if I try to create in another process, the value of semaphore is not same. I am using same name in both process(1st argument of sem_open()).
Please suggest to create semaphore (cross-processes).
POSIX unnamed semaphores are not supported.
Use either POSIX named semaphores, or use System V semaphores:
man sem_open man semget
-- Terry
_______________________________________________ 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... This email sent to site_archiver@lists.apple.com
participants (1)
-
Rakesh Singhal