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:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-21 16:41:30 +0300
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-05 15:56:13 +0300
commitd902eef0939eeae5ce4a188251c993cd00648a13 (patch)
tree98fb644ba870cb01c105f0c9696ffe1089ef0c3b /newlib/libc/sys/rtems
parent9187bb23a0dc7f0badcf22833de2ff193e9e0f68 (diff)
RTEMS: Make pthread_rwlock_t self-contained
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Diffstat (limited to 'newlib/libc/sys/rtems')
-rw-r--r--newlib/libc/sys/rtems/include/sys/_pthreadtypes.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/newlib/libc/sys/rtems/include/sys/_pthreadtypes.h b/newlib/libc/sys/rtems/include/sys/_pthreadtypes.h
index 4cb15d14b..5638f1569 100644
--- a/newlib/libc/sys/rtems/include/sys/_pthreadtypes.h
+++ b/newlib/libc/sys/rtems/include/sys/_pthreadtypes.h
@@ -206,9 +206,14 @@ typedef struct {
/* POSIX Reader/Writer Lock Types */
#if defined(_POSIX_READER_WRITER_LOCKS)
-typedef __uint32_t pthread_rwlock_t; /* POSIX RWLock Object */
+typedef struct {
+ unsigned long _flags;
+ struct _Thread_queue_Queue _Queue;
+ unsigned int _current_state;
+ unsigned int _number_of_readers;
+} pthread_rwlock_t;
-#define _PTHREAD_RWLOCK_INITIALIZER ((pthread_rwlock_t) 0xFFFFFFFF)
+#define _PTHREAD_RWLOCK_INITIALIZER { 0, _THREAD_QUEUE_INITIALIZER, 0, 0 }
typedef struct {
int is_initialized; /* is this structure initialized? */