Mutexes are recommended to correctly handle priority inversion, especially if you use LWIP_CORE_LOCKING .
◆ sys_mutex_new()
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.
- Parameters
-
mutex | pointer to the mutex to create |
- Returns
- ERR_OK if successful, another err_t otherwise
330 ++lwip_stats.sys.mutex.err;
336 ++lwip_stats.sys.mutex.used;
337 if (lwip_stats.sys.mutex.max < lwip_stats.sys.mutex.used) {
338 lwip_stats.sys.mutex.max = lwip_stats.sys.mutex.used;
◆ sys_mutex_lock()
◆ sys_mutex_unlock()
Unlock a mutex
- Parameters
-
◆ sys_mutex_free()
Delete a semaphore
- Parameters
-
348 --lwip_stats.sys.mutex.used;
◆ sys_mutex_valid()
Check if a mutex is valid/allocated: return 1 for valid, 0 for invalid
◆ sys_mutex_set_invalid()
Set a mutex invalid so that sys_mutex_valid returns 0