about summary refs log tree commit diff
path: root/src/rt/rust_builtin.cpp
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-06-16 15:34:15 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-06-16 15:34:15 -0700
commit3e2006a57088a0b6e1b40fe22df88955d1ef9ec7 (patch)
treed3617239416d3b8350833e1a56cdb48498968563 /src/rt/rust_builtin.cpp
parente3c6e5e5b67283db4e3170c569a56b2a12c7d945 (diff)
downloadrust-3e2006a57088a0b6e1b40fe22df88955d1ef9ec7.tar.gz
rust-3e2006a57088a0b6e1b40fe22df88955d1ef9ec7.zip
Revert "Adding a lock/condition variable to libcore."
This reverts commit e394ebda37bf6bbe4c516e2b9381aac8bd964dcc.
Diffstat (limited to 'src/rt/rust_builtin.cpp')
-rw-r--r--src/rt/rust_builtin.cpp55
1 files changed, 0 insertions, 55 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp
index 25da500cb23..2a65012b52a 100644
--- a/src/rt/rust_builtin.cpp
+++ b/src/rt/rust_builtin.cpp
@@ -7,7 +7,6 @@
 #include "sync/timer.h"
 #include "rust_abi.h"
 #include "rust_port.h"
-#include "rust_cond_lock.h"
 
 #include <time.h>
 
@@ -863,60 +862,6 @@ rust_task_allow_kill() {
     task->allow_kill();
 }
 
-extern "C" rust_cond_lock*
-rust_create_cond_lock() {
-    return new rust_cond_lock();
-}
-
-extern "C" void
-rust_destroy_cond_lock(rust_cond_lock *lock) {
-    delete lock;
-}
-
-extern "C" void
-rust_lock_cond_lock(rust_cond_lock *lock) {
-    lock->lock.lock();
-}
-
-extern "C" void
-rust_unlock_cond_lock(rust_cond_lock *lock) {
-    lock->lock.unlock();
-}
-
-// The next two functions do not use the built in condition variable features
-// because the Rust schedule is not aware of them, and they can block the
-// scheduler thread.
-
-extern "C" void
-rust_wait_cond_lock(rust_cond_lock *lock) {
-    rust_task *task = rust_get_current_task();
-#ifdef DEBUG_LOCKS
-    assert(lock->lock.lock_held_by_current_thread());
-#endif
-    assert(NULL == lock->waiting);
-    lock->waiting = task;
-    lock->lock.unlock();
-    task->block(lock, "waiting for signal");
-    lock->lock.lock();
-    lock->waiting = NULL;
-}
-
-extern "C" bool
-rust_signal_cond_lock(rust_cond_lock *lock) {
-#ifdef DEBUG_LOCKS
-    assert(lock->lock.lock_held_by_current_thread());
-#endif
-    if(NULL == lock->waiting) {
-        return false;
-    }
-    else {
-        lock->waiting->wakeup(lock);
-        return true;
-    }
-}
-
-
-
 //
 // Local Variables:
 // mode: C++