diff options
author | rpj <rpj> | 2001-07-05 11:57:32 +0000 |
---|---|---|
committer | rpj <rpj> | 2001-07-05 11:57:32 +0000 |
commit | 99e8ecc5759668fd3af379eaddd70b4ae50ecd7f (patch) | |
tree | 8b824cc1eb8de6fd15a4b5636f5f62fa95541105 /mutex.c | |
parent | 861a8bb5523f257b474f68334c2c5300e52c5371 (diff) |
Added new routines from POSIX 1003.1j. This is alpha level code.
* spin.c: New module implementing spin locks.
* barrier.c: New module implementing barriers.
* pthread.h (_POSIX_SPIN_LOCKS): defined.
(_POSIX_BARRIERS): Defined.
(pthread_spin_*): Defined.
(pthread_barrier*): Defined.
(PTHREAD_BARRIER_SERIAL_THREAD): Defined.
* implement.h (pthread_spinlock_t_): Defined.
(pthread_barrier_t_): Defined.
(pthread_barrierattr_t_): Defined.
* mutex.c (pthread_mutex_lock): Return with the error
if an auto-initialiser initialisation fails.
* nonportable.c (pthread_getprocessors_np): New; gets the
number of available processors for the current process.
Diffstat (limited to 'mutex.c')
-rw-r--r-- | mutex.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -632,7 +632,10 @@ pthread_mutex_lock(pthread_mutex_t *mutex) */ if (*mutex == (pthread_mutex_t) PTW32_OBJECT_AUTO_INIT) { - result = ptw32_mutex_check_need_init(mutex); + if ((result = ptw32_mutex_check_need_init(mutex)) != 0) + { + return(result); + } } mx = *mutex; |