tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

sem_post and libpthread



Hi all,
looking at some missing features in libpthread, I stumpled over the
semaphore implementation in it. POSIX requires that sem_post is async
signal safe. Our test cases also assume that. The implementation in
libpthread doesn't match this expection though.

Discussing this with rmind brought up the question of how/whether to fix
this. Are process-local semaphores used often enough to warrant a signal-safe
implementation that doesn't involve system calls for the case of no
waiter on the queue? If there are waiters and the value is currently 0,
a signal call has to be generated anyway (lwp_unpark), so it can just
as well use the kernel implementation.

Joerg


Home | Main Index | Thread Index | Old Index