Function gstd::exec::wake

source ·
pub fn wake(message_id: MessageId) -> Result<()>
Expand description

Resume previously paused message handling.

Suppose a message has been paused using the crate::exec::wait function, 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.


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

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

extern "C" fn init() {
    unsafe { MSG_ID = msg::id() };

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