Searched refs:mutex (Results 1 – 18 of 18) sorted by relevance
33 static void threading_mutex_init_pthread( mbedtls_threading_mutex_t *mutex ) in threading_mutex_init_pthread() argument35 if( mutex == NULL || mutex->is_valid ) in threading_mutex_init_pthread()38 mutex->is_valid = pthread_mutex_init( &mutex->mutex, NULL ) == 0; in threading_mutex_init_pthread()41 static void threading_mutex_free_pthread( mbedtls_threading_mutex_t *mutex ) in threading_mutex_free_pthread() argument43 if( mutex == NULL || !mutex->is_valid ) in threading_mutex_free_pthread()46 (void) pthread_mutex_destroy( &mutex->mutex ); in threading_mutex_free_pthread()47 mutex->is_valid = 0; in threading_mutex_free_pthread()50 static int threading_mutex_lock_pthread( mbedtls_threading_mutex_t *mutex ) in threading_mutex_lock_pthread() argument52 if( mutex == NULL || ! mutex->is_valid ) in threading_mutex_lock_pthread()55 if( pthread_mutex_lock( &mutex->mutex ) != 0 ) in threading_mutex_lock_pthread()[all …]
87 mbedtls_mutex_init( &ctx->mutex ); in mbedtls_ssl_cookie_init()101 mbedtls_mutex_init( &ctx->mutex ); in mbedtls_ssl_cookie_free()187 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_ssl_cookie_write()195 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_ssl_cookie_write()223 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_ssl_cookie_check()233 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_ssl_cookie_check()
74 mbedtls_mutex_init( &ctx->mutex ); in mbedtls_entropy_init()126 mbedtls_mutex_free( &ctx->mutex ); in mbedtls_entropy_free()138 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_entropy_add_source()158 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_entropy_add_source()207 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_entropy_update_manual()214 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_entropy_update_manual()272 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_entropy_gather()279 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_entropy_gather()308 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_entropy_func()374 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_entropy_func()
54 mbedtls_mutex_init( &cache->mutex ); in mbedtls_ssl_cache_init()68 if( mbedtls_mutex_lock( &cache->mutex ) != 0 ) in mbedtls_ssl_cache_get()130 if( mbedtls_mutex_unlock( &cache->mutex ) != 0 ) in mbedtls_ssl_cache_get()149 if( ( ret = mbedtls_mutex_lock( &cache->mutex ) ) != 0 ) in mbedtls_ssl_cache_set()278 if( mbedtls_mutex_unlock( &cache->mutex ) != 0 ) in mbedtls_ssl_cache_set()322 mbedtls_mutex_free( &cache->mutex ); in mbedtls_ssl_cache_free()
55 mbedtls_mutex_init( &ctx->mutex ); in mbedtls_ssl_ticket_init()313 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_ssl_ticket_write()357 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_ssl_ticket_write()406 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_ssl_ticket_parse()467 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_ssl_ticket_parse()483 mbedtls_mutex_free( &ctx->mutex ); in mbedtls_ssl_ticket_free()
87 mbedtls_threading_mutex_t mutex; member552 if( mbedtls_mutex_lock( &heap.mutex ) != 0 ) in buffer_alloc_calloc_mutexed()555 if( mbedtls_mutex_unlock( &heap.mutex ) ) in buffer_alloc_calloc_mutexed()564 if( mbedtls_mutex_lock( &heap.mutex ) ) in buffer_alloc_free_mutexed()567 (void) mbedtls_mutex_unlock( &heap.mutex ); in buffer_alloc_free_mutexed()577 mbedtls_mutex_init( &heap.mutex ); in mbedtls_memory_buffer_alloc_init()606 mbedtls_mutex_free( &heap.mutex ); in mbedtls_memory_buffer_alloc_free()
66 mbedtls_mutex_init( &ctx->mutex ); in mbedtls_hmac_drbg_init()315 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_hmac_drbg_random()322 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_hmac_drbg_random()338 mbedtls_mutex_free( &ctx->mutex ); in mbedtls_hmac_drbg_free()
65 mbedtls_mutex_init( &ctx->mutex ); in mbedtls_ctr_drbg_init()121 mbedtls_mutex_free( &ctx->mutex ); in mbedtls_ctr_drbg_free()404 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_ctr_drbg_random()411 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_ctr_drbg_random()
76 mbedtls_mutex_init( &ctx->mutex ); in mbedtls_rsa_init()289 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_rsa_public()307 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_rsa_public()379 if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) in mbedtls_rsa_private()442 if( mbedtls_mutex_unlock( &ctx->mutex ) != 0 ) in mbedtls_rsa_private()1524 mbedtls_mutex_free( &ctx->mutex ); in mbedtls_rsa_free()
46 pthread_mutex_t mutex; member90 extern void (*mbedtls_mutex_init)( mbedtls_threading_mutex_t *mutex );91 extern void (*mbedtls_mutex_free)( mbedtls_threading_mutex_t *mutex );92 extern int (*mbedtls_mutex_lock)( mbedtls_threading_mutex_t *mutex );93 extern int (*mbedtls_mutex_unlock)( mbedtls_threading_mutex_t *mutex );
62 mbedtls_threading_mutex_t mutex; member
69 mbedtls_threading_mutex_t mutex; member
81 mbedtls_threading_mutex_t mutex; /*!< mutex */ member
95 mbedtls_threading_mutex_t mutex; member
135 mbedtls_threading_mutex_t mutex; /*!< mutex */ member
107 mbedtls_threading_mutex_t mutex; member
108 mbedtls_threading_mutex_t mutex; /*!< Thread-safety mutex */ member
305 result trying to unlock an unlocked mutex on invalid input (found by