Use must_have_lock instead of private functions. (Issue #2700)

I hereby declare that messages sent from the same source arrive in order (Issue #2605)

Removing FIXME, owned is the correct type here. (Issue #2704)

Remove outdated FIXME (Issue #2703)

Updating test for spawning native functions (Issue #2602)

Removing bogus FIXME (Issue #2599)
This commit is contained in:
Eric Holk
2012-06-22 13:07:07 -07:00
parent 1d6fb24b70
commit 26c11f7b50
6 changed files with 4 additions and 21 deletions

View File

@@ -891,9 +891,7 @@ rust_unlock_cond_lock(rust_cond_lock *lock) {
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
lock->lock.must_have_lock();
assert(NULL == lock->waiting);
lock->waiting = task;
task->block(lock, "waiting for signal");
@@ -905,9 +903,7 @@ rust_wait_cond_lock(rust_cond_lock *lock) {
extern "C" bool
rust_signal_cond_lock(rust_cond_lock *lock) {
#ifdef DEBUG_LOCKS
assert(lock->lock.lock_held_by_current_thread());
#endif
lock->lock.must_have_lock();
if(NULL == lock->waiting) {
return false;
}