| /optee_os/lib/libmbedtls/mbedtls/library/ |
| H A D | threading.c | 53 static void threading_mutex_init_pthread(mbedtls_threading_mutex_t *mutex) in threading_mutex_init_pthread() argument 55 if (mutex == NULL) { in threading_mutex_init_pthread() 65 (void) pthread_mutex_init(&mutex->mutex, NULL); in threading_mutex_init_pthread() 68 static void threading_mutex_free_pthread(mbedtls_threading_mutex_t *mutex) in threading_mutex_free_pthread() argument 70 if (mutex == NULL) { in threading_mutex_free_pthread() 74 (void) pthread_mutex_destroy(&mutex->mutex); in threading_mutex_free_pthread() 77 static int threading_mutex_lock_pthread(mbedtls_threading_mutex_t *mutex) in threading_mutex_lock_pthread() argument 79 if (mutex == NULL) { in threading_mutex_lock_pthread() 83 if (pthread_mutex_lock(&mutex->mutex) != 0) { in threading_mutex_lock_pthread() 90 static int threading_mutex_unlock_pthread(mbedtls_threading_mutex_t *mutex) in threading_mutex_unlock_pthread() argument [all …]
|
| H A D | ssl_cache.c | 32 mbedtls_mutex_init(&cache->mutex); in mbedtls_ssl_cache_init() 84 if ((ret = mbedtls_mutex_lock(&cache->mutex)) != 0) { in mbedtls_ssl_cache_get() 105 if (mbedtls_mutex_unlock(&cache->mutex) != 0) { in mbedtls_ssl_cache_get() 259 if ((ret = mbedtls_mutex_lock(&cache->mutex)) != 0) { in mbedtls_ssl_cache_set() 308 if (mbedtls_mutex_unlock(&cache->mutex) != 0) { in mbedtls_ssl_cache_set() 331 if ((ret = mbedtls_mutex_lock(&cache->mutex)) != 0) { in mbedtls_ssl_cache_remove() 362 if (mbedtls_mutex_unlock(&cache->mutex) != 0) { in mbedtls_ssl_cache_remove() 405 mbedtls_mutex_free(&cache->mutex); in mbedtls_ssl_cache_free()
|
| H A D | entropy.c | 33 mbedtls_mutex_init(&ctx->mutex); in mbedtls_entropy_init() 75 mbedtls_mutex_free(&ctx->mutex); in mbedtls_entropy_free() 93 if ((ret = mbedtls_mutex_lock(&ctx->mutex)) != 0) { in mbedtls_entropy_add_source() 113 if (mbedtls_mutex_unlock(&ctx->mutex) != 0) { in mbedtls_entropy_add_source() 179 if ((ret = mbedtls_mutex_lock(&ctx->mutex)) != 0) { in mbedtls_entropy_update_manual() 187 if (mbedtls_mutex_unlock(&ctx->mutex) != 0) { in mbedtls_entropy_update_manual() 254 if ((ret = mbedtls_mutex_lock(&ctx->mutex)) != 0) { in mbedtls_entropy_gather() 262 if (mbedtls_mutex_unlock(&ctx->mutex) != 0) { in mbedtls_entropy_gather() 294 if ((ret = mbedtls_mutex_lock(&ctx->mutex)) != 0) { in mbedtls_entropy_func() 374 if (mbedtls_mutex_unlock(&ctx->mutex) != 0) { in mbedtls_entropy_func()
|
| H A D | ssl_cookie.c | 75 mbedtls_mutex_init(&ctx->mutex); in mbedtls_ssl_cookie_init() 97 mbedtls_mutex_free(&ctx->mutex); in mbedtls_ssl_cookie_free() 249 if ((ret = mbedtls_mutex_lock(&ctx->mutex)) != 0) { in mbedtls_ssl_cookie_write() 258 if (mbedtls_mutex_unlock(&ctx->mutex) != 0) { in mbedtls_ssl_cookie_write() 332 if ((ret = mbedtls_mutex_lock(&ctx->mutex)) != 0) { in mbedtls_ssl_cookie_check() 344 if (mbedtls_mutex_unlock(&ctx->mutex) != 0) { in mbedtls_ssl_cookie_check()
|
| H A D | ssl_ticket.c | 41 mbedtls_mutex_init(&ctx->mutex); in mbedtls_ssl_ticket_init() 330 if ((ret = mbedtls_mutex_lock(&ctx->mutex)) != 0) { in mbedtls_ssl_ticket_write() 389 if (mbedtls_mutex_unlock(&ctx->mutex) != 0) { in mbedtls_ssl_ticket_write() 445 if ((ret = mbedtls_mutex_lock(&ctx->mutex)) != 0) { in mbedtls_ssl_ticket_parse() 524 if (mbedtls_mutex_unlock(&ctx->mutex) != 0) { in mbedtls_ssl_ticket_parse() 550 mbedtls_mutex_free(&ctx->mutex); in mbedtls_ssl_ticket_free()
|
| H A D | hmac_drbg.c | 108 mbedtls_mutex_init(&ctx->mutex); in mbedtls_hmac_drbg_seed_buf() 238 mbedtls_mutex_init(&ctx->mutex); in mbedtls_hmac_drbg_seed() 388 if ((ret = mbedtls_mutex_lock(&ctx->mutex)) != 0) { in mbedtls_hmac_drbg_random() 396 if (mbedtls_mutex_unlock(&ctx->mutex) != 0) { in mbedtls_hmac_drbg_random() 417 mbedtls_mutex_free(&ctx->mutex); in mbedtls_hmac_drbg_free()
|
| H A D | memory_buffer_alloc.c | 63 mbedtls_threading_mutex_t mutex; member 540 if (mbedtls_mutex_lock(&heap.mutex) != 0) { in buffer_alloc_calloc_mutexed() 544 if (mbedtls_mutex_unlock(&heap.mutex)) { in buffer_alloc_calloc_mutexed() 554 if (mbedtls_mutex_lock(&heap.mutex)) { in buffer_alloc_free_mutexed() 558 (void) mbedtls_mutex_unlock(&heap.mutex); in buffer_alloc_free_mutexed() 567 mbedtls_mutex_init(&heap.mutex); in mbedtls_memory_buffer_alloc_init() 599 mbedtls_mutex_free(&heap.mutex); in mbedtls_memory_buffer_alloc_free()
|
| /optee_os/core/include/kernel/ |
| H A D | mutex.h | 13 struct mutex { struct 22 struct mutex m; /* used when lock_depth goes 0 -> 1 or 1 -> 0 */ argument 30 TAILQ_HEAD(mutex_head, mutex); 32 void mutex_init(struct mutex *m); 33 void mutex_destroy(struct mutex *m); 40 void mutex_unlock_debug(struct mutex *m, const char *fname, int lineno); 43 void mutex_lock_debug(struct mutex *m, const char *fname, int lineno); 46 bool mutex_trylock_debug(struct mutex *m, const char *fname, int lineno); 49 void mutex_read_unlock_debug(struct mutex *m, const char *fname, int lineno); 52 void mutex_read_lock_debug(struct mutex *m, const char *fname, int lineno); [all …]
|
| H A D | mutex_pm_aware.h | 28 struct mutex mutex; /* access protection in thread context */ member 33 .mutex = MUTEX_INITIALIZER, \
|
| /optee_os/core/kernel/ |
| H A D | mutex_lockdep.h | 13 void mutex_lock_check(struct mutex *m); 15 void mutex_trylock_check(struct mutex *m); 17 void mutex_unlock_check(struct mutex *m); 19 void mutex_destroy_check(struct mutex *m); 23 static inline void mutex_lock_check(struct mutex *m __unused) in mutex_lock_check() 26 static inline void mutex_trylock_check(struct mutex *m __unused) in mutex_trylock_check() 29 static inline void mutex_unlock_check(struct mutex *m __unused) in mutex_unlock_check() 32 static inline void mutex_destroy_check(struct mutex *m __unused) in mutex_destroy_check()
|
| H A D | mutex.c | 16 void mutex_init(struct mutex *m) in mutex_init() 18 *m = (struct mutex)MUTEX_INITIALIZER; in mutex_init() 26 static void __mutex_lock(struct mutex *m, const char *fname, int lineno) in __mutex_lock() 91 static void __mutex_unlock(struct mutex *m, const char *fname, int lineno) in __mutex_unlock() 128 static bool __mutex_trylock(struct mutex *m, const char *fname __unused, in __mutex_trylock() 151 static void __mutex_read_unlock(struct mutex *m, const char *fname, int lineno) in __mutex_read_unlock() 173 static void __mutex_read_lock(struct mutex *m, const char *fname, int lineno) in __mutex_read_lock() 215 static bool __mutex_read_trylock(struct mutex *m, const char *fname __unused, in __mutex_read_trylock() 237 void mutex_unlock_debug(struct mutex *m, const char *fname, int lineno) in mutex_unlock_debug() 242 void mutex_lock_debug(struct mutex *m, const char *fname, int lineno) in mutex_lock_debug() [all …]
|
| H A D | mutex_lockdep.c | 37 void mutex_lock_check(struct mutex *m) in mutex_lock_check() 47 void mutex_trylock_check(struct mutex *m) in mutex_trylock_check() 57 void mutex_unlock_check(struct mutex *m) in mutex_unlock_check() 67 void mutex_destroy_check(struct mutex *m) in mutex_destroy_check()
|
| H A D | tee_time_ree.c | 11 static struct mutex time_mu = MUTEX_INITIALIZER;
|
| /optee_os/core/arch/arm/include/kernel/ |
| H A D | tee_l2cc_mutex.h | 16 TEE_Result tee_get_l2cc_mutex(paddr_t *mutex); 17 TEE_Result tee_set_l2cc_mutex(paddr_t *mutex); 30 static TEE_Result tee_get_l2cc_mutex(paddr_t *mutex); 31 static TEE_Result tee_set_l2cc_mutex(paddr_t *mutex); 41 static inline TEE_Result tee_get_l2cc_mutex(paddr_t *mutex __unused) in tee_get_l2cc_mutex() 45 static inline TEE_Result tee_set_l2cc_mutex(paddr_t *mutex __unused) in tee_set_l2cc_mutex()
|
| /optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ |
| H A D | threading.h | 30 pthread_mutex_t MBEDTLS_PRIVATE(mutex); 81 extern void (*mbedtls_mutex_init)(mbedtls_threading_mutex_t *mutex); 82 extern void (*mbedtls_mutex_free)(mbedtls_threading_mutex_t *mutex); 83 extern int (*mbedtls_mutex_lock)(mbedtls_threading_mutex_t *mutex); 84 extern int (*mbedtls_mutex_unlock)(mbedtls_threading_mutex_t *mutex);
|
| H A D | ssl_cookie.h | 59 mbedtls_threading_mutex_t MBEDTLS_PRIVATE(mutex);
|
| H A D | ssl_cache.h | 72 mbedtls_threading_mutex_t MBEDTLS_PRIVATE(mutex); /*!< mutex */
|
| H A D | ssl_ticket.h | 82 mbedtls_threading_mutex_t MBEDTLS_PRIVATE(mutex);
|
| /optee_os/lib/libutils/ext/ |
| H A D | pthread_stubs.c | 10 int pthread_mutex_lock(pthread_mutex_t *mutex __unused); 11 int pthread_mutex_unlock(pthread_mutex_t *mutex __unused); 13 int __weak pthread_mutex_lock(pthread_mutex_t *mutex __unused) in pthread_mutex_lock() 18 int __weak pthread_mutex_unlock(pthread_mutex_t *mutex __unused) in pthread_mutex_unlock()
|
| /optee_os/core/arch/arm/kernel/ |
| H A D | tee_l2cc_mutex.c | 54 static void l2cc_mutex_set(void *mutex) in l2cc_mutex_set() argument 56 l2cc_mutex = (unsigned int *)mutex; in l2cc_mutex_set() 97 TEE_Result tee_get_l2cc_mutex(paddr_t *mutex) in tee_get_l2cc_mutex() argument 106 *mutex = l2cc_mutex_pa; in tee_get_l2cc_mutex() 110 TEE_Result tee_set_l2cc_mutex(paddr_t *mutex) in tee_set_l2cc_mutex() argument 117 addr = *mutex; in tee_set_l2cc_mutex()
|
| /optee_os/core/pta/tests/ |
| H A D | sub.mk | 6 srcs-y += mutex.c
|
| /optee_os/core/drivers/crypto/hisilicon/ |
| H A D | hisi_qm.h | 173 struct mutex qp_lock; /* protect the qp instance */ 174 struct mutex mailbox_lock;
|
| /optee_os/core/mm/ |
| H A D | file.c | 39 struct mutex mu; 43 static struct mutex file_mu = MUTEX_INITIALIZER;
|
| /optee_os/core/tee/ |
| H A D | tee_pobj.c | 13 static struct mutex pobjs_mutex = MUTEX_INITIALIZER; 14 static struct mutex pobjs_usage_mutex = MUTEX_INITIALIZER;
|
| /optee_os/core/drivers/crypto/stm32/ |
| H A D | stm32_cryp.h | 48 struct mutex *lock; /* Protect CRYP HW instance access */
|