diff --git a/newlib/ChangeLog b/newlib/ChangeLog index d65758498..ebc3c94c8 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2013-01-22 Joel Sherrill + + * libc/include/pthread.h: Add PTHREAD_RWLOCK_INITIALIZER. + Fix typo on PTHREAD_COJND_INITIALIZER. + 2013-01-17 Marcus Shawcroft * libc/machine/aarch64/strncmp.S: Correct arithmetic for diff --git a/newlib/libc/include/pthread.h b/newlib/libc/include/pthread.h index 09d4def5d..ff7f354fd 100644 --- a/newlib/libc/include/pthread.h +++ b/newlib/libc/include/pthread.h @@ -104,7 +104,7 @@ int _EXFUN(pthread_cond_destroy, (pthread_cond_t *__mutex)); pthread_cond_t cond = PTHREAD_COND_INITIALIZER; */ -#define PTHREAD_COND_INITIALIZER ((pthread_mutex_t) 0xFFFFFFFF) +#define PTHREAD_COND_INITIALIZER ((pthread_cond_t) 0xFFFFFFFF) /* Broadcasting and Signaling a Condition, P1003.1c/Draft 10, p. 101 */ @@ -328,6 +328,13 @@ int _EXFUN(pthread_spin_unlock, (pthread_spinlock_t *__spinlock)); #if defined(_POSIX_READER_WRITER_LOCKS) +/* This is used to statically initialize a pthread_rwlock_t. Example: + + pthread_mutex_t mutex = PTHREAD_RWLOCK_INITIALIZER; + */ + +#define PTHREAD_RWLOCK_INITIALIZER ((pthread_rwlock_t) 0xFFFFFFFF) + int _EXFUN(pthread_rwlockattr_init, (pthread_rwlockattr_t *__attr)); int _EXFUN(pthread_rwlockattr_destroy, (pthread_rwlockattr_t *__attr)); int _EXFUN(pthread_rwlockattr_getpshared,