next up previous contents index
Next: 18.3.46 osenv_process_unlock: Unlock the Up: 18.3 POSIX Threads Reference Previous: 18.3.44 sched_yield: Yield the

18.3.45 osenv_process_lock: Lock the process lock

 

SYNOPSIS

#include <oskit/threads/pthread.h>

void osenv_process_lock(void);

DESCRIPTION

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.

RELATED INFORMATION

osenv_process_unlock, osenv_sleep, osenv_wakeup



University of Utah Flux Research Group