aboutsummaryrefslogtreecommitdiff
path: root/src/rt/util
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-09-08 19:13:49 -0700
committerGraydon Hoare <[email protected]>2010-09-08 19:13:49 -0700
commit616b7afb724a32df41eebfaf95402d008c60b411 (patch)
tree03e13578e8b43b9001cef983d1117800a6f93e65 /src/rt/util
parentXFAIL many.rs since it crashes on win32, and add a time-slice sleep to the ke... (diff)
downloadrust-616b7afb724a32df41eebfaf95402d008c60b411.tar.xz
rust-616b7afb724a32df41eebfaf95402d008c60b411.zip
Tidy up the sync dir, remove dead or mis-designed code in favour of OS primitives, switch rust_kernel to use a lock/signal pair and wait rather than spin.
Diffstat (limited to 'src/rt/util')
-rw-r--r--src/rt/util/synchronized_indexed_list.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/rt/util/synchronized_indexed_list.h b/src/rt/util/synchronized_indexed_list.h
index a373db66..6b561171 100644
--- a/src/rt/util/synchronized_indexed_list.h
+++ b/src/rt/util/synchronized_indexed_list.h
@@ -5,7 +5,7 @@
template<typename T> class synchronized_indexed_list :
public indexed_list<T> {
- spin_lock _lock;
+ lock_and_signal _lock;
public:
synchronized_indexed_list(memory_region *region) :
@@ -61,4 +61,15 @@ public:
}
};
+//
+// Local Variables:
+// mode: C++
+// fill-column: 78;
+// indent-tabs-mode: nil
+// c-basic-offset: 4
+// buffer-file-coding-system: utf-8-unix
+// compile-command: "make -k -C ../.. 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
+// End:
+//
+
#endif /* SYNCHRONIZED_INDEXED_LIST_H */