major semaphore improvements (performance and correctness)
authorRich Felker <dalias@aerifal.cx>
Wed, 6 Apr 2011 16:24:34 +0000 (12:24 -0400)
committerRich Felker <dalias@aerifal.cx>
Wed, 6 Apr 2011 16:24:34 +0000 (12:24 -0400)
commita113434cd68ce30642c4995b1caadcd084be6f09
treeb26daaeda2c9e2caf1605615c497a4a84191e01d
parentcd3bb38412cfcc3bc47985ba25287e0af463609a
major semaphore improvements (performance and correctness)

1. make sem_[timed]wait interruptible by signals, per POSIX
2. keep a waiter count in order to avoid unnecessary futex wake syscalls
src/thread/__timedwait.c
src/thread/pthread_cond_timedwait.c
src/thread/sem_post.c
src/thread/sem_timedwait.c
src/thread/sem_trywait.c