first part of ne2k_pci driver, pci driver improved, docs
[quarnos.git] / resources / spinlock.h
bloba22196b76aa99f11a870879fd26bd6dff51f5d48
1 /* Quarn OS
3 * Spinlock class
5 * Copyright (C) 2008 Pawel Dziepak
7 * Class that implements access control strategy known as spinlock.
8 */
10 #ifndef _SPINLOCK_H_
11 #define _SPINLOCK_H_
13 #include "manes/access_control.h"
15 class spinlock : public access_control {
16 private:
17 volatile bool locked;
18 public:
19 spinlock();
20 ~spinlock();
22 bool try_lock();
24 void lock(lock_type);
25 void unlock();
28 #endif