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>
This commit is contained in:
parent
9bbc5a34f2
commit
ba49de472f
|
@ -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 }
|
||||
|
||||
|
|
Loading…
Reference in New Issue