about summary refs log tree commit diff
path: root/src/rt/rust_kernel.cpp
diff options
context:
space:
mode:
authorEric Holk <eholk@mozilla.com>2011-05-31 17:44:54 -0700
committerGraydon Hoare <graydon@mozilla.com>2011-06-13 18:14:13 -0700
commitd1857d30fc05f29fb82231336b229e50948a8336 (patch)
tree8a1ad8ad6dcda631e4858902008e3d7b8227b271 /src/rt/rust_kernel.cpp
parent1595c9d767de72340358028e87d3eb386af0adfe (diff)
downloadrust-d1857d30fc05f29fb82231336b229e50948a8336.tar.gz
rust-d1857d30fc05f29fb82231336b229e50948a8336.zip
This is the mega-ucontext commit. It replaces the task switching mechanism with a new one inspired by ucontext. It works under Linux, OS X and Windows, and is Valgrind clean on Linux and OS X (provided the runtime is built with gcc).
This commit also moves yield and join to the standard library, as requested in #42. Join is currently a no-op though.
Diffstat (limited to 'src/rt/rust_kernel.cpp')
-rw-r--r--src/rt/rust_kernel.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rt/rust_kernel.cpp b/src/rt/rust_kernel.cpp
index 3c2ad01128e..f72da483c35 100644
--- a/src/rt/rust_kernel.cpp
+++ b/src/rt/rust_kernel.cpp
@@ -187,8 +187,11 @@ rust_kernel::~rust_kernel() {
     KLOG("freeing handles");
 
     free_handles(_task_handles);
+    KLOG("..task handles freed");
     free_handles(_port_handles);
+    KLOG("..port handles freed");
     free_handles(_dom_handles);
+    KLOG("..dom handles freed");
 
     KLOG("freeing queues");
 
@@ -214,6 +217,7 @@ rust_kernel::free_handles(hash_map<T*, rust_handle<T>* > &map) {
     T* key;
     rust_handle<T> *value;
     while (map.pop(&key, &value)) {
+        KLOG("...freeing " PTR, value);
         delete value;
     }
 }