Lines Matching defs:mutex
53 static void threading_mutex_init_pthread(mbedtls_threading_mutex_t *mutex)
55 if (mutex == NULL) {
59 /* One problem here is that calling lock on a pthread mutex without first
63 * variable. Please make sure any new mutex that gets added is exercised in
65 (void) pthread_mutex_init(&mutex->mutex, NULL);
68 static void threading_mutex_free_pthread(mbedtls_threading_mutex_t *mutex)
70 if (mutex == NULL) {
74 (void) pthread_mutex_destroy(&mutex->mutex);
77 static int threading_mutex_lock_pthread(mbedtls_threading_mutex_t *mutex)
79 if (mutex == NULL) {
83 if (pthread_mutex_lock(&mutex->mutex) != 0) {
90 static int threading_mutex_unlock_pthread(mbedtls_threading_mutex_t *mutex)
92 if (mutex == NULL) {
96 if (pthread_mutex_unlock(&mutex->mutex) != 0) {
116 static int threading_mutex_fail(mbedtls_threading_mutex_t *mutex)
118 ((void) mutex);
121 static void threading_mutex_dummy(mbedtls_threading_mutex_t *mutex)
123 ((void) mutex);