From 413994ea3eed976a6fe97f3d6cfeb0c2f453e77f Mon Sep 17 00:00:00 2001 From: Jon Morton Date: Sun, 1 Apr 2012 21:14:16 -0500 Subject: replace assertion macros with plain asserts --- src/rt/rust_kernel.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/rt/rust_kernel.cpp') diff --git a/src/rt/rust_kernel.cpp b/src/rt/rust_kernel.cpp index c7625537f40..8c2b0030bce 100644 --- a/src/rt/rust_kernel.cpp +++ b/src/rt/rust_kernel.cpp @@ -67,13 +67,13 @@ rust_kernel::create_scheduler(size_t num_threads) { // the scheduler reaper. bool start_reaper = sched_table.empty(); id = max_sched_id++; - K(srv, id != INTPTR_MAX, "Hit the maximum scheduler id"); + assert(id != INTPTR_MAX && "Hit the maximum scheduler id"); sched = new (this, "rust_scheduler") rust_scheduler(this, srv, num_threads, id); bool is_new = sched_table .insert(std::pair(id, sched)).second; - A(this, is_new, "Reusing a sched id?"); + assert(is_new && "Reusing a sched id?"); if (start_reaper) { sched_reaper.start(); } @@ -118,7 +118,7 @@ rust_kernel::wait_for_schedulers() rust_sched_id id = join_list.back(); join_list.pop_back(); sched_map::iterator iter = sched_table.find(id); - I(this, iter != sched_table.end()); + assert(iter != sched_table.end()); rust_scheduler *sched = iter->second; sched_table.erase(iter); sched->join_task_threads(); @@ -175,7 +175,7 @@ rust_kernel::fail() { rust_task_id rust_kernel::generate_task_id() { rust_task_id id = sync::increment(max_task_id); - K(srv, id != INTPTR_MAX, "Hit the maximum task id"); + assert(id != INTPTR_MAX && "Hit the maximum task id"); return id; } @@ -189,7 +189,7 @@ rust_kernel::register_port(rust_port *port) { port_table.put(new_port_id, port); new_live_ports = port_table.count(); } - K(srv, new_port_id != INTPTR_MAX, "Hit the maximum port id"); + assert(new_port_id != INTPTR_MAX && "Hit the maximum port id"); KLOG_("Registered port %" PRIdPTR, new_port_id); KLOG_("Total outstanding ports: %d", new_live_ports); return new_port_id; @@ -233,7 +233,7 @@ rust_kernel::win32_require(LPCTSTR fn, BOOL ok) { (LPTSTR) &buf, 0, NULL ); KLOG_ERR_(dom, "%s failed with error %ld: %s", fn, err, buf); LocalFree((HLOCAL)buf); - I(this, ok); + assert(ok); } } #endif -- cgit 1.4.1-3-g733a5