#include <oskit/threads/pthread.h>void osenv_process_lock(void);
Attempt to lock the process lock. If the lock cannot be immediately granted, the thread is put to sleep until it can be. The process lock is provided so that the client operating system can protect the device driver framework from concurrent execution. It is expected than any entry into the device framework will first take the process lock. If the thread executing inside the device driver framework blocks by calling osenv_sleep, the process lock will be released so that another thread may enter it safely. When the thread is woken up later, it will take the process lock again before returning from the sleep.Attempts to recursively lock the process lock will result in a panic. This is intended as a debugging measure to prevent indiscriminate nesting of components that try to take the lock.
osenv_process_unlock, osenv_sleep, osenv_wakeup