[PATCH] RTEMS: Make pthread_cond_t self-contained
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Sep 27 09:25:07 UTC 2017
Signed-off-by: Sebastian Huber <sebastian.huber at embedded-brains.de>
---
newlib/libc/sys/rtems/include/sys/_pthreadtypes.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/newlib/libc/sys/rtems/include/sys/_pthreadtypes.h b/newlib/libc/sys/rtems/include/sys/_pthreadtypes.h
index 9ee443407..70477a2a6 100644
--- a/newlib/libc/sys/rtems/include/sys/_pthreadtypes.h
+++ b/newlib/libc/sys/rtems/include/sys/_pthreadtypes.h
@@ -152,9 +152,13 @@ typedef struct {
/* Condition Variables */
-typedef __uint32_t pthread_cond_t; /* identify a condition variable */
+typedef struct {
+ unsigned long _flags;
+ pthread_mutex_t *_mutex;
+ struct _Thread_queue_Queue _Queue;
+} pthread_cond_t;
-#define _PTHREAD_COND_INITIALIZER ((pthread_cond_t) 0xFFFFFFFF)
+#define _PTHREAD_COND_INITIALIZER { 0, 0, _THREAD_QUEUE_INITIALIZER }
typedef struct {
int is_initialized;
--
2.12.3
More information about the devel
mailing list