pub unsafe extern "C" fn k_poll_signal_raise(
sig: *mut k_poll_signal,
result: i32,
) -> i32
Expand description
@brief Signal a poll signal object.
This routine makes ready a poll signal, which is basically a poll event of type K_POLL_TYPE_SIGNAL. If a thread was polling on that event, it will be made ready to run. A @a result value can be specified.
The poll signal contains a ‘signaled’ field that, when set by k_poll_signal_raise(), stays set until the user sets it back to 0 with k_poll_signal_reset(). It thus has to be reset by the user before being passed again to k_poll() or k_poll() will consider it being signaled, and will return immediately.
@note The result is stored and the ‘signaled’ field is set even if this function returns an error indicating that an expiring poll was not notified. The next k_poll() will detect the missed raise.
@param sig A poll signal. @param result The value to store in the result field of the signal.
@retval 0 The signal was delivered successfully. @retval -EAGAIN The polling thread’s timeout is in the process of expiring.