diff options
| author | Jon Morton <jonanin@gmail.com> | 2012-04-01 21:14:16 -0500 |
|---|---|---|
| committer | Jon Morton <jonanin@gmail.com> | 2012-04-01 21:14:16 -0500 |
| commit | 413994ea3eed976a6fe97f3d6cfeb0c2f453e77f (patch) | |
| tree | 653313277b5712ea63d7e381ae74397f62f435bb /src/rt/rust_builtin.cpp | |
| parent | 9ec21933f1b730862f85c4dc6a4e46359e84a865 (diff) | |
| download | rust-413994ea3eed976a6fe97f3d6cfeb0c2f453e77f.tar.gz rust-413994ea3eed976a6fe97f3d6cfeb0c2f453e77f.zip | |
replace assertion macros with plain asserts
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index aa1f1ce1e6a..fd6664cf6a3 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -450,8 +450,7 @@ rust_get_sched_id() { extern "C" CDECL rust_sched_id rust_new_sched(uintptr_t threads) { rust_task *task = rust_sched_loop::get_task(); - A(task->sched_loop, threads > 0, - "Can't create a scheduler with no threads, silly!"); + assert(threads > 0 && "Can't create a scheduler with no threads, silly!"); return task->kernel->create_scheduler(threads); } @@ -606,36 +605,31 @@ rust_dbg_lock_create() { extern "C" CDECL void rust_dbg_lock_destroy(lock_and_signal *lock) { - rust_task *task = rust_sched_loop::get_task(); - I(task->sched_loop, lock); + assert(lock); delete lock; } extern "C" CDECL void rust_dbg_lock_lock(lock_and_signal *lock) { - rust_task *task = rust_sched_loop::get_task(); - I(task->sched_loop, lock); + assert(lock); lock->lock(); } extern "C" CDECL void rust_dbg_lock_unlock(lock_and_signal *lock) { - rust_task *task = rust_sched_loop::get_task(); - I(task->sched_loop, lock); + assert(lock); lock->unlock(); } extern "C" CDECL void rust_dbg_lock_wait(lock_and_signal *lock) { - rust_task *task = rust_sched_loop::get_task(); - I(task->sched_loop, lock); + assert(lock); lock->wait(); } extern "C" CDECL void rust_dbg_lock_signal(lock_and_signal *lock) { - rust_task *task = rust_sched_loop::get_task(); - I(task->sched_loop, lock); + assert(lock); lock->signal(); } |
