diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-11-17 13:21:28 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-11-17 13:28:45 +0300 |
commit | ba49de472f7ec17df8189c3c011dbf90a576e04b (patch) | |
tree | 5cb5425e7bdacb2de14d0f5aa13b93118be4f624 /newlib | |
parent | 9bbc5a34f2b4c3ce6d62744f30ba8ef0306271b9 (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>
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/libc/sys/rtems/include/sys/lock.h | 4 |
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 } |