Home
last modified time | relevance | path

Searched refs:mutex (Results 1 – 18 of 18) sorted by relevance

/net-tools-3.7.0/mbedtls-2.4.0/library/
Dthreading.c33 static void threading_mutex_init_pthread( mbedtls_threading_mutex_t *mutex ) in threading_mutex_init_pthread() argument
35 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() argument
43 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() argument
52 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 …]
Dssl_cookie.c87 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()
Dentropy.c74 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()
Dssl_cache.c54 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()
Dssl_ticket.c55 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()
Dmemory_buffer_alloc.c87 mbedtls_threading_mutex_t mutex; member
552 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()
Dhmac_drbg.c66 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()
Dctr_drbg.c65 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()
Drsa.c76 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()
/net-tools-3.7.0/mbedtls-2.4.0/include/mbedtls/
Dthreading.h46 pthread_mutex_t mutex; member
90 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 );
Dssl_cookie.h62 mbedtls_threading_mutex_t mutex; member
Dssl_ticket.h69 mbedtls_threading_mutex_t mutex; member
Dssl_cache.h81 mbedtls_threading_mutex_t mutex; /*!< mutex */ member
Dhmac_drbg.h95 mbedtls_threading_mutex_t mutex; member
Dentropy.h135 mbedtls_threading_mutex_t mutex; /*!< mutex */ member
Dctr_drbg.h107 mbedtls_threading_mutex_t mutex; member
Drsa.h108 mbedtls_threading_mutex_t mutex; /*!< Thread-safety mutex */ member
/net-tools-3.7.0/mbedtls-2.4.0/
DChangeLog305 result trying to unlock an unlocked mutex on invalid input (found by