update rcu comments
[model-checker-benchmarks.git] / ticket-lock / lock.h
1 #ifndef _LOCK_H
2 #define _LOCK_H
3
4 #include <stdio.h>
5 #include <threads.h>
6 #include <stdatomic.h>
7
8 typedef struct TicketLock {
9         atomic_uint ticket;
10         atomic_uint turn;
11 } TicketLock;
12
13 void initTicketLock(TicketLock* l);
14
15 void lock(TicketLock *l);
16
17 void unlock(TicketLock *l);
18
19 #endif