pub unsafe extern "C" fn magma_poll(
items: *mut magma_poll_item_t,
count: u32,
timeout_ns: u64,
) -> magma_status_t
Expand description
\brief Waits for at least one of the given items to meet a condition. Does not reset any semaphores. When MAGMA_STATUS_OK is returned, results are returned in the items array. MAGMA_STATUS_TIMED_OUT is returned if no conditions are met before the given timeout expires. If the notification channel handle is included in the item list, and the magma connection is closed, then MAGMA_STATUS_CONNECTION_LOST is returned. \param items Array of poll items. Type should be either MAGMA_POLL_TYPE_SEMAPHORE or MAGMA_POLL_TYPE_HANDLE. Condition may be set to MAGMA_POLL_CONDITION_SIGNALED OR MAGMA_POLL_CONDITION_READABLE. If condition is 0 the item is ignored. Item results are set to the condition that was satisfied, otherwise 0. If the same item is given twice the behavior is undefined. \param count Number of poll items in the array. \param timeout_ns Time in ns to wait before returning MAGMA_STATUS_TIMED_OUT.