about summary refs log tree commit diff
path: root/src/rt/rust_kernel.cpp
diff options
context:
space:
mode:
authorJon Morton <jonanin@gmail.com>2012-04-01 21:14:16 -0500
committerJon Morton <jonanin@gmail.com>2012-04-01 21:14:16 -0500
commit413994ea3eed976a6fe97f3d6cfeb0c2f453e77f (patch)
tree653313277b5712ea63d7e381ae74397f62f435bb /src/rt/rust_kernel.cpp
parent9ec21933f1b730862f85c4dc6a4e46359e84a865 (diff)
downloadrust-413994ea3eed976a6fe97f3d6cfeb0c2f453e77f.tar.gz
rust-413994ea3eed976a6fe97f3d6cfeb0c2f453e77f.zip
replace assertion macros with plain asserts
Diffstat (limited to 'src/rt/rust_kernel.cpp')
-rw-r--r--src/rt/rust_kernel.cpp12
1 files changed, 6 insertions, 6 deletions
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<rust_sched_id,
                               rust_scheduler*>(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