Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2013-01-23 01:20:08 +0400
committerJoel Sherrill <joel.sherrill@oarcorp.com>2013-01-23 01:20:08 +0400
commit6c3f590cd99ec6f666ee75afa0dfd2c45fc680ca (patch)
treea83a5a39362fcd03bf5b4deb281a167b6e6a840f /newlib/libc
parent761dfa99bad549cce11ec5b4571127bac5b67e04 (diff)
2013-01-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/include/pthread.h: Add PTHREAD_RWLOCK_INITIALIZER. Fix typo on PTHREAD_COJND_INITIALIZER.
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/include/pthread.h9
1 files changed, 8 insertions, 1 deletions
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,