Searched refs:mtx (Results 1 – 8 of 8) sorted by relevance
/sys/kern/ |
D | mutex.c | 30 Mutex_Init(Mutex *mtx, const char *name) in Mutex_Init() argument 32 Spinlock_Init(&mtx->lock, name, SPINLOCK_TYPE_NORMAL); in Mutex_Init() 33 WaitChannel_Init(&mtx->chan, name); in Mutex_Init() 39 Mutex_Destroy(Mutex *mtx) in Mutex_Destroy() argument 41 WaitChannel_Destroy(&mtx->chan); in Mutex_Destroy() 42 Spinlock_Destroy(&mtx->lock); in Mutex_Destroy() 52 Mutex_Lock(Mutex *mtx) in Mutex_Lock() argument 70 Mutex_TryLock(Mutex *mtx) in Mutex_TryLock() argument 83 Mutex_Unlock(Mutex *mtx) in Mutex_Unlock() argument
|
D | cv.c | 46 CV_Wait(CV *cv, Mutex *mtx) in CV_Wait() argument
|
/lib/libc/core/ |
D | mutex.c | 9 CoreMutex_Init(CoreMutex *mtx) in CoreMutex_Init() argument 11 mtx->lock = 0; in CoreMutex_Init() 16 CoreMutex_Lock(CoreMutex *mtx) in CoreMutex_Lock() argument 18 while (__sync_lock_test_and_set(&mtx->lock, 1) == 1) { in CoreMutex_Lock() 24 CoreMutex_TryLock(CoreMutex *mtx) in CoreMutex_TryLock() argument 26 if (__sync_lock_test_and_set(&mtx->lock, 1) == 1) { in CoreMutex_TryLock() 34 CoreMutex_Unlock(CoreMutex *mtx) in CoreMutex_Unlock() argument 36 __sync_lock_release(&mtx->lock); in CoreMutex_Unlock()
|
/lib/libc/posix/ |
D | pthread.c | 217 struct pthread_mutex *mtx = (struct pthread_mutex *)malloc(sizeof(*mtx)); in pthread_mutex_init() local 219 if (mtx == NULL) { in pthread_mutex_init() 223 mtx->lock = 0; in pthread_mutex_init() 224 *mutex = mtx; in pthread_mutex_init() 232 struct pthread_mutex *mtx = *mutex; in pthread_mutex_destroy() local 234 if (mtx == NULL) { in pthread_mutex_destroy() 236 } else if (mtx->lock == 1) { in pthread_mutex_destroy() 240 free(mtx); in pthread_mutex_destroy() 248 struct pthread_mutex *mtx; in pthread_mutex_lock() local 256 mtx = *mutex; in pthread_mutex_lock() [all …]
|
/tests/ |
D | pthreadtest.c | 15 pthread_mutex_t mtx; variable 33 status = pthread_mutex_lock(&mtx); in thread_lock() 36 status = pthread_mutex_unlock(&mtx); in thread_lock() 89 status = pthread_mutex_init(&mtx, NULL); in main() 91 status = pthread_mutex_lock(&mtx); in main() 93 status = pthread_mutex_unlock(&mtx); in main() 95 status = pthread_mutex_destroy(&mtx); in main() 101 pthread_mutex_init(&mtx, NULL); in main() 105 status = pthread_mutex_lock(&mtx); in main() 108 pthread_mutex_unlock(&mtx); in main() [all …]
|
/sys/include/ |
D | mutex.h | 16 void Mutex_Init(Mutex *mtx, const char *name); 17 void Mutex_Destroy(Mutex *mtx); 18 void Mutex_Lock(Mutex *mtx); 19 int Mutex_TryLock(Mutex *mtx); 20 void Mutex_Unlock(Mutex *mtx);
|
D | cv.h | 11 void CV_Wait(CV *cv, Mutex *mtx);
|
/include/core/ |
D | mutex.h | 9 void CoreMutex_Init(CoreMutex *mtx); 10 void CoreMutex_Lock(CoreMutex *mtx); 11 bool CoreMutex_TryLock(CoreMutex *mtx); 12 void CoreMutex_Unlock(CoreMutex *mtx);
|