aboutsummaryrefslogtreecommitdiff
path: root/src/rt/sync/lock_free_queue.h
diff options
context:
space:
mode:
authorMichael Bebenita <[email protected]>2010-08-17 23:15:14 -0700
committerMichael Bebenita <[email protected]>2010-08-17 23:49:57 -0700
commit6e9f0f952d758bae2b530c2c9b780f2addf10207 (patch)
tree0b6925b02fd784c2303e7801823bf82dcf13dccc /src/rt/sync/lock_free_queue.h
parentUpdates to run.py. You can now pass in the rust_log and a flag to terminate o... (diff)
downloadrust-6e9f0f952d758bae2b530c2c9b780f2addf10207.tar.xz
rust-6e9f0f952d758bae2b530c2c9b780f2addf10207.zip
Made the lock_free_queue lock (temporarily, until fixed).
Diffstat (limited to 'src/rt/sync/lock_free_queue.h')
-rw-r--r--src/rt/sync/lock_free_queue.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rt/sync/lock_free_queue.h b/src/rt/sync/lock_free_queue.h
index 1f09ec52..c1a309b8 100644
--- a/src/rt/sync/lock_free_queue.h
+++ b/src/rt/sync/lock_free_queue.h
@@ -1,6 +1,8 @@
#ifndef LOCK_FREE_QUEUE_H
#define LOCK_FREE_QUEUE_H
+#include "spin_lock.h"
+
class lock_free_queue_node {
public:
lock_free_queue_node *next;
@@ -8,6 +10,7 @@ public:
};
class lock_free_queue : lock_free_queue_node {
+ spin_lock lock;
lock_free_queue_node *_tail;
public:
lock_free_queue();