about summary refs log tree commit diff
path: root/src/rt/rust_kernel.h
diff options
context:
space:
mode:
authorMichael Bebenita <mbebenita@mozilla.com>2010-09-15 11:56:45 -0700
committerMichael Bebenita <mbebenita@mozilla.com>2010-09-16 00:51:03 -0700
commit1bd331b7aaa24245f86868305ab64600683a41e1 (patch)
tree1b088c433bc95ee416eefe502b0dca866b5dead6 /src/rt/rust_kernel.h
parent91b4a0c9f8ba7be56fc098ffc6182a888e3970bf (diff)
downloadrust-1bd331b7aaa24245f86868305ab64600683a41e1.tar.gz
rust-1bd331b7aaa24245f86868305ab64600683a41e1.zip
Fixed deadlock caused by the message pump not being notified of new message sends.
Diffstat (limited to 'src/rt/rust_kernel.h')
-rw-r--r--src/rt/rust_kernel.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/rt/rust_kernel.h b/src/rt/rust_kernel.h
index f85d55ac201..3ad7b396575 100644
--- a/src/rt/rust_kernel.h
+++ b/src/rt/rust_kernel.h
@@ -9,6 +9,7 @@
  */
 
 class rust_kernel;
+class rust_message;
 
 template <typename T> class
 rust_handle :
@@ -90,6 +91,16 @@ public:
 
     bool is_deadlocked();
 
+    void signal_kernel_lock();
+
+    /**
+     * Notifies the kernel whenever a message has been enqueued . This gives
+     * the kernel the opportunity to wake up the message pump thread if the
+     * message queue is not associated.
+     */
+    void
+    notify_message_enqueued(rust_message_queue *queue, rust_message *message);
+
     /**
      * Blocks until all domains have terminated.
      */