repo.or.cz
/
trinity.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
split up constants.h some
[trinity.git]
/
include
/
locks.h
blob
f1fa26b605e5415031e46ca49b4d73fb4a8ab152
1
#pragma once
2
3
struct
lock_struct
{
4
volatile
unsigned char
lock
;
5
pid_t owner
;
6
unsigned long
contention
;
7
};
8
9
typedef
struct
lock_struct lock_t
;
10
11
#define UNLOCKED 0
12
#define LOCKED 1
13
14
void
lock
(
lock_t
*
_lock
);
15
void
unlock
(
lock_t
*
_lock
);