From d6b7c96c3eb29b9244ece0c046d3f372ff432d04 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Wed, 23 Jun 2010 21:03:09 -0700 Subject: Populate tree. --- src/rt/sync/spin_lock.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/rt/sync/spin_lock.h (limited to 'src/rt/sync/spin_lock.h') diff --git a/src/rt/sync/spin_lock.h b/src/rt/sync/spin_lock.h new file mode 100644 index 00000000..3684c23a --- /dev/null +++ b/src/rt/sync/spin_lock.h @@ -0,0 +1,14 @@ +#ifndef UNFAIR_TICKET_LOCK_H +#define UNFAIR_TICKET_LOCK_H + +class spin_lock { + unsigned ticket; + void pause(); +public: + spin_lock(); + virtual ~spin_lock(); + void lock(); + void unlock(); +}; + +#endif /* UNFAIR_TICKET_LOCK_H */ -- cgit v1.2.3