The Pedigree Project
0.1
|
Functions | |
err_t | sys_mutex_new (sys_mutex_t *mutex) |
void | sys_mutex_lock (sys_mutex_t *mutex) |
void | sys_mutex_unlock (sys_mutex_t *mutex) |
void | sys_mutex_free (sys_mutex_t *mutex) |
int | sys_mutex_valid (sys_mutex_t *mutex) |
void | sys_mutex_set_invalid (sys_mutex_t *mutex) |
Mutexes are recommended to correctly handle priority inversion, especially if you use LWIP_CORE_LOCKING .
void sys_mutex_free | ( | sys_mutex_t * | mutex | ) |
void sys_mutex_lock | ( | sys_mutex_t * | mutex | ) |
Lock a mutex
mutex | the mutex to lock |
Definition at line 301 of file sys_arch.cc.
References Semaphore::acquire().
Referenced by mem_malloc().
err_t sys_mutex_new | ( | sys_mutex_t * | mutex | ) |
Create a new mutex. Note that mutexes are expected to not be taken recursively by the lwIP code, so both implementation types (recursive or non-recursive) should work.
mutex | pointer to the mutex to create |
Definition at line 294 of file sys_arch.cc.
References ERR_OK.
Referenced by mem_init(), and tcpip_init().
void sys_mutex_set_invalid | ( | sys_mutex_t * | mutex | ) |
Set a mutex invalid so that sys_mutex_valid returns 0
Definition at line 326 of file sys_arch.cc.
References Processor::getInterrupts(), and Processor::setInterrupts().
void sys_mutex_unlock | ( | sys_mutex_t * | mutex | ) |
Unlock a mutex
mutex | the mutex to unlock |
Definition at line 308 of file sys_arch.cc.
References Semaphore::release().
Referenced by mem_malloc().
int sys_mutex_valid | ( | sys_mutex_t * | mutex | ) |
Check if a mutex is valid/allocated: return 1 for valid, 0 for invalid
Definition at line 321 of file sys_arch.cc.