#include <oskit/dev/dev.h>int osenv_sleep(osenv_sleeprec_t *sleeprec);
Component OS, Blocking
The driver calls this function at process level to put the current activity (process) to sleep until some event occurs, typically triggered by a hardware interrupt or timer handler. The driver must supply a pointer to a process-private ``sleep record'' variable (sleeprec), which is typically just allocated on the stack by the driver. The sleeprec must already have been initialized using osenv_sleep_init. If the event of interest occurs after the osenv_sleep_init but before the osenv_sleep, then osenv_sleep will return immediately without blocking.
- sleeprec
- A pointer to the process-private sleep record, already allocated by the driver and initialized using osenv_sleep_init.
Returns the wakeup status value provided to osenv_wakeup.