wake

Function wake 

Source
pub fn wake(message_id: MessageId) -> Result<(), Error>
Expand description

Resume previously paused message handling.

Suppose a message has been paused using the wait function. In that case, it is possible to continue its execution by calling this function.

message_id specifies a particular message to be taken out of the waiting queue and put into the processing queue.

ยงExamples

use gcore::{MessageId, exec, msg};

static mut MSG_ID: MessageId = MessageId::zero();

#[unsafe(no_mangle)]
extern "C" fn init() {
    unsafe { MSG_ID = msg::id() };
    exec::wait();
}

#[unsafe(no_mangle)]
extern "C" fn handle() {
    exec::wake(unsafe { MSG_ID }).expect("Unable to wake");
}