repo.or.cz
/
quarnos.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
first part of ne2k_pci driver, pci driver improved, docs
[quarnos.git]
/
resources
/
spinlock.h
blob
a22196b76aa99f11a870879fd26bd6dff51f5d48
1
/* Quarn OS
2
*
3
* Spinlock class
4
*
5
* Copyright (C) 2008 Pawel Dziepak
6
*
7
* Class that implements access control strategy known as spinlock.
8
*/
9
10
#ifndef _SPINLOCK_H_
11
#define _SPINLOCK_H_
12
13
#include
"manes/access_control.h"
14
15
class
spinlock
:
public
access_control
{
16
private
:
17
volatile
bool
locked
;
18
public
:
19
spinlock
();
20
~
spinlock
();
21
22
bool
try_lock
();
23
24
void
lock
(
lock_type
);
25
void
unlock
();
26
};
27
28
#endif