mt-waitset: adding masking of channels so a thread won't handle two messages at the...
[barrelfish] / lib / barrelfish / threads.c
index 8d9e849..3e0ad29 100644 (file)
@@ -256,6 +256,7 @@ static void thread_init(dispatcher_handle_t disp, struct thread *newthread)
 
     newthread->rpc_in_progress = false;
     newthread->async_error = SYS_ERR_OK;
+    newthread->mask_channels = false;
 }
 
 /**
@@ -682,6 +683,16 @@ errval_t thread_get_async_error(void)
     return thread_self()->async_error;
 }
 
+void thread_set_mask_channels(bool m)
+{
+    thread_self()->mask_channels = m;
+}
+
+bool thread_get_mask_channels(void)
+{
+    return thread_self()->mask_channels;
+}
+
 /**
  * \brief Yield the calling thread
  *