New POSIX semaphore functionality

Corinna Vinschen
Mon Oct 27 12:05:00 GMT 2003


just a FYI.  I've extended the POSIX SEM functionality as described in

I've added process shared semaphores, as well as named semaphores,
together with the needed functions sem_open() and sem_close(). 

Also I've added the missing sem_timedwait() and sem_getvalue() functions.

sem_post() returned the wrong value and forgot to change errno.  This
is fixed now.

The only missing functionality from POSIX semaphore now is sem_unlink().
I don't how to implement it correctly.  The requirement is, if a process
has called sem_unlink(), further calls to sem_open() using the same name
will create a new semaphore.  Other processes, which have still a 
semaphore using the same name, but opened before the call to sem_unlink(),
are unaffected.  This isn't supported by Windows semaphores, AFAIK.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                      
Red Hat, Inc.

More information about the Cygwin-developers mailing list