<<On Mon, 18 Nov 2002 22:31:28 -0600, "Brian Smith" <[EMAIL PROTECTED]> said:

> Is this the recommended method of preventing these problems?

The recommended method of preventing these problems generally is to
use POSIX semaphores (or other POSIX synchronization mechanisms
appropriate to threaded programs.  However, the code to implement
process-shared POSIX semaphores is still experimental.

The problem with System V semaphores is that there is no way to poll
their status while still polling the process's file descriptors.  This
could be fixed by introducing a new kqueue filter, but the semantics
of System V semaphores are difficult to emulate.

Depending on the semantics you require, a semaphore may be implemented
using a pipe or fifo, or by using file or record locking.

-GAWollman


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to