split up constants.h some
[trinity.git] / include / locks.h
blobf1fa26b605e5415031e46ca49b4d73fb4a8ab152
1 #pragma once
3 struct lock_struct {
4 volatile unsigned char lock;
5 pid_t owner;
6 unsigned long contention;
7 };
9 typedef struct lock_struct lock_t;
11 #define UNLOCKED 0
12 #define LOCKED 1
14 void lock(lock_t *_lock);
15 void unlock(lock_t *_lock);