pub fn wait_for_event(mask: u8, timeout: i32) -> StatusExpand description
Wait for input event. Single active blocking syscall.
This syscall holds the current thread as long as none of the event requested in the given event mask is received.
The event source (a device for an interrupt, a PID for an IPC or signal) can be set. Setting the source to 0 means that any source is allowed.
If received, event information is set in the task SVC data
structure and the function returns Status::Ok.
This function must be the single blocking point of the function (excepting sleep() case)
NOTE: The timeout is kept i32 by now due to C FFI. Usage of enumerate is not easy as, at the end, the value is set to a HW register… which is a u32, to be transferred to the kernel corresponding gate.