Prev Next | OpenBSD and Rthreads | Slide #25 |
mutex and conditional-variable implementations were based on semaphores
pthread_cond_wait() does 'down' operation on semaphore
pthread_cond_signal() does one 'up' if anyone is blocked
pthread_cond_broadcast() gets count of blocked threads and does that many 'up' operations
EuroBSDCon 2012 | Copyright © 2012 Philip Guenther |