unify and overhaul timed futex waits
authorRich Felker <dalias@aerifal.cx>
Wed, 3 Aug 2011 01:11:36 +0000 (21:11 -0400)
committerRich Felker <dalias@aerifal.cx>
Wed, 3 Aug 2011 01:11:36 +0000 (21:11 -0400)
commitec381af90208a5675183202cf05078eac208edfb
tree26005bfd6a3b4f7b4788183d89ec1c2769bd2022
parentc68de0be2fb649f91b31080224fb6e48084eaaee
unify and overhaul timed futex waits

new features:

- FUTEX_WAIT_BITSET op will be used for timed waits if available. this
  saves a call to clock_gettime.

- error checking for the timespec struct is now inside __timedwait so
  it doesn't need to be duplicated everywhere. cond_timedwait still
  needs to duplicate it to avoid unlocking the mutex, though.

- pushing and popping the cancellation handler is delegated to
  __timedwait, and cancellable/non-cancellable waits are unified.
src/internal/futex.h
src/internal/pthread_impl.h
src/thread/__timedwait.c
src/thread/__timedwait_cp.c [deleted file]
src/thread/pthread_cond_timedwait.c
src/thread/pthread_join.c
src/thread/pthread_mutex_timedlock.c
src/thread/pthread_rwlock_timedrdlock.c
src/thread/pthread_rwlock_timedwrlock.c
src/thread/sem_timedwait.c