public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: newlib@sourceware.org
Subject: [PATCH 5/6] RTEMS: Make pthread_cond_t self-contained
Date: Thu, 05 Oct 2017 12:56:00 -0000	[thread overview]
Message-ID: <20171005125558.3191-5-sebastian.huber@embedded-brains.de> (raw)
In-Reply-To: <20171005125558.3191-1-sebastian.huber@embedded-brains.de>

Signed-off-by: Sebastian Huber <sebastian.huber@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 5638f1569..0b607f7f2 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;
+  struct _Thread_queue_Queue _Queue;
+  pthread_mutex_t *_mutex;
+} pthread_cond_t;
 
-#define _PTHREAD_COND_INITIALIZER ((pthread_cond_t) 0xFFFFFFFF)
+#define _PTHREAD_COND_INITIALIZER { 0, _THREAD_QUEUE_INITIALIZER, 0 }
 
 typedef struct {
   int      is_initialized;
-- 
2.12.3

  parent reply	other threads:[~2017-10-05 12:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05 12:56 [PATCH 1/6] RTEMS: Optimize pthread_once_t Sebastian Huber
2017-10-05 12:56 ` [PATCH 6/6] RTEMS: Make pthread_mutex_t self-contained Sebastian Huber
2017-10-05 12:56 ` [PATCH 4/6] RTEMS: Make pthread_rwlock_t self-contained Sebastian Huber
2017-10-05 12:56 ` [PATCH 2/6] RTEMS: Make sem_t self-contained Sebastian Huber
2017-10-05 12:56 ` Sebastian Huber [this message]
2017-10-05 13:53 ` [PATCH 3/6] RTEMS: Make pthread_barrier_t self-contained Sebastian Huber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171005125558.3191-5-sebastian.huber@embedded-brains.de \
    --to=sebastian.huber@embedded-brains.de \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).