Lines Matching refs:mutex
114 #define sys_mutex_new(mutex) sys_sem_new(mutex, 1)
115 #define sys_mutex_lock(mutex) sys_sem_wait(mutex)
116 #define sys_mutex_unlock(mutex) sys_sem_signal(mutex)
117 #define sys_mutex_free(mutex) sys_sem_free(mutex)
118 #define sys_mutex_valid(mutex) sys_sem_valid(mutex)
119 #define sys_mutex_set_invalid(mutex) sys_sem_set_invalid(mutex)
125 * Create a new mutex.
128 * @param mutex pointer to the mutex to create
131 err_t sys_mutex_new(sys_mutex_t *mutex);
134 * Lock a mutex
135 * @param mutex the mutex to lock
137 void sys_mutex_lock(sys_mutex_t *mutex);
140 * Unlock a mutex
141 * @param mutex the mutex to unlock
143 void sys_mutex_unlock(sys_mutex_t *mutex);
147 * @param mutex the mutex to delete
149 void sys_mutex_free(sys_mutex_t *mutex);
153 * Check if a mutex is valid/allocated: return 1 for valid, 0 for invalid
155 int sys_mutex_valid(sys_mutex_t *mutex);
160 * Set a mutex invalid so that sys_mutex_valid returns 0
162 void sys_mutex_set_invalid(sys_mutex_t *mutex);
378 * mutex. The implementation should allow calling SYS_ARCH_PROTECT when
390 * using a semaphore or mutex. This macro will default to calling the