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>2016-11-17 13:21:28 +0300
committerCorinna Vinschen <corinna@vinschen.de>2016-11-17 13:28:45 +0300
commitba49de472f7ec17df8189c3c011dbf90a576e04b (patch)
tree5cb5425e7bdacb2de14d0f5aa13b93118be4f624
parent9bbc5a34f2b4c3ce6d62744f30ba8ef0306271b9 (diff)
Add _TICKET_LOCK_INITIALIZER to <sys/lock.h>
Add _TICKET_LOCK_INITIALIZER to statically initialize a _Ticket_lock_Control structure. This makes it possible to embed a ticket lock in other structures outside of <sys/lock.h>. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
-rw-r--r--newlib/libc/sys/rtems/include/sys/lock.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/newlib/libc/sys/rtems/include/sys/lock.h b/newlib/libc/sys/rtems/include/sys/lock.h
index f716a6964..c0549db67 100644
--- a/newlib/libc/sys/rtems/include/sys/lock.h
+++ b/newlib/libc/sys/rtems/include/sys/lock.h
@@ -70,7 +70,9 @@ struct _Futex_Control {
struct _Thread_queue_Queue _Queue;
};
-#define _THREAD_QUEUE_INITIALIZER { { 0, 0 }, 0, 0 }
+#define _TICKET_LOCK_INITIALIZER { 0, 0 }
+
+#define _THREAD_QUEUE_INITIALIZER { _TICKET_LOCK_INITIALIZER, 0, 0 }
#define _MUTEX_INITIALIZER { _THREAD_QUEUE_INITIALIZER }