Although the Mac OSX pthreads implementation complies with the POSIX standard, it does not include all the pthreads and associated
functionality available on Linux. Functions that are not implemented are available as stubs that return error codes. This
can be problematical when porting code that does not rigorously check error return codes, as the code will compile and run
but may not function as expected. Here are some specific features of Linux pthreads that are not available on Mac OSX as of
the Tiger release:
- Unnamed semaphores are not supported.
- Cancellation points are only pthread_test_cancel() instead of POSIX mandatory cancellation points. So pthread_cancel will cancel a thread only when pthread_test_cancel() is called by that thread. (This is fixed in Leopard.)
- There is no static initializer for pthread_rwlock_t or recursive mutex.
- Mutex priorities: pthread_mutex_setprioceiling and pthread_mutex_setprotocol are not supported, meaning there is no priority boosting, inheritance or ceiling support for mutexes.
- PTHREAD_SCOPE_PROCESS is not supported.