Home
last modified time | relevance | path

Searched refs:lock (Results 1 – 25 of 83) sorted by relevance

1234

/openssl/crypto/
H A Dthreads_win.c41 SRWLOCK lock; member
272 if (data->thread_qps[i].lock == lock) in ossl_rcu_read_lock()
283 data->thread_qps[available_qp].lock = lock; in ossl_rcu_read_lock()
306 if (data->thread_qps[i].lock == lock) { in ossl_rcu_read_unlock()
338 while (lock->group_count - lock->writers_alloced < 2) in update_qp()
637 if (lock == NULL || !CRYPTO_THREAD_write_lock(lock)) in CRYPTO_atomic_add64()
656 if (lock == NULL || !CRYPTO_THREAD_write_lock(lock)) in CRYPTO_atomic_and()
675 if (lock == NULL || !CRYPTO_THREAD_write_lock(lock)) in CRYPTO_atomic_or()
693 if (lock == NULL || !CRYPTO_THREAD_read_lock(lock)) in CRYPTO_atomic_load()
709 if (lock == NULL || !CRYPTO_THREAD_read_lock(lock)) in CRYPTO_atomic_store()
[all …]
H A Dthreads_pthread.c451 if (data->thread_qps[i].lock == lock) { in ossl_rcu_read_lock()
464 data->thread_qps[available_qp].lock = lock; in ossl_rcu_read_lock()
477 if (data->thread_qps[i].lock == lock) { in ossl_rcu_read_unlock()
517 while (lock->group_count - lock->writers_alloced < 2) in update_qp()
875 if (lock == NULL || !CRYPTO_THREAD_write_lock(lock)) in CRYPTO_atomic_add()
902 if (lock == NULL || !CRYPTO_THREAD_write_lock(lock)) in CRYPTO_atomic_add64()
928 if (lock == NULL || !CRYPTO_THREAD_write_lock(lock)) in CRYPTO_atomic_and()
954 if (lock == NULL || !CRYPTO_THREAD_write_lock(lock)) in CRYPTO_atomic_or()
979 if (lock == NULL || !CRYPTO_THREAD_read_lock(lock)) in CRYPTO_atomic_load()
1002 if (lock == NULL || !CRYPTO_THREAD_write_lock(lock)) in CRYPTO_atomic_store()
[all …]
H A Dthreads_none.c29 struct rcu_lock_st *lock; in ossl_rcu_lock_new() local
31 lock = OPENSSL_zalloc(sizeof(*lock)); in ossl_rcu_lock_new()
32 return lock; in ossl_rcu_lock_new()
37 OPENSSL_free(lock); in ossl_rcu_lock_free()
65 lock->cb_items = NULL; in ossl_synchronize_rcu()
85 lock->cb_items = new; in ossl_rcu_call()
101 CRYPTO_RWLOCK *lock; in CRYPTO_THREAD_lock_new() local
107 *(unsigned int *)lock = 1; in CRYPTO_THREAD_lock_new()
109 return lock; in CRYPTO_THREAD_lock_new()
134 if (lock == NULL) in CRYPTO_THREAD_lock_free()
[all …]
H A Dinitthread.c51 CRYPTO_RWLOCK *lock; member
163 if (!CRYPTO_THREAD_write_lock(gtr->lock)) in init_thread_push_handlers()
166 CRYPTO_THREAD_unlock(gtr->lock); in init_thread_push_handlers()
179 if (!CRYPTO_THREAD_write_lock(gtr->lock)) in init_thread_remove_handlers()
187 CRYPTO_THREAD_unlock(gtr->lock); in init_thread_remove_handlers()
191 CRYPTO_THREAD_unlock(gtr->lock); in init_thread_remove_handlers()
340 if (!CRYPTO_THREAD_write_lock(gtr->lock)) in init_thread_stop()
363 CRYPTO_THREAD_unlock(gtr->lock); in init_thread_stop()
445 CRYPTO_THREAD_unlock(gtr->lock); in init_thread_deregister()
467 CRYPTO_THREAD_lock_free(gtr->lock); in init_thread_deregister()
[all …]
H A Dcore_namemap.c39 CRYPTO_RWLOCK *lock; member
92 if (!CRYPTO_THREAD_read_lock(namemap->lock)) in ossl_namemap_empty()
95 CRYPTO_THREAD_unlock(namemap->lock); in ossl_namemap_empty()
123 if (!CRYPTO_THREAD_read_lock(namemap->lock)) in ossl_namemap_doall_names()
130 CRYPTO_THREAD_unlock(namemap->lock); in ossl_namemap_doall_names()
192 if (!CRYPTO_THREAD_read_lock(namemap->lock)) in ossl_namemap_num2name()
199 CRYPTO_THREAD_unlock(namemap->lock); in ossl_namemap_num2name()
289 if (!CRYPTO_THREAD_write_lock(namemap->lock)) in ossl_namemap_add_name()
292 CRYPTO_THREAD_unlock(namemap->lock); in ossl_namemap_add_name()
369 CRYPTO_THREAD_unlock(namemap->lock); in ossl_namemap_add_names()
[all …]
H A Dprovider_core.c220 CRYPTO_RWLOCK *lock; member
394 CRYPTO_THREAD_unlock(store->lock); in ossl_provider_info_add_to_store()
662 CRYPTO_THREAD_unlock(store->lock); in ossl_provider_add_to_store()
700 CRYPTO_THREAD_unlock(store->lock); in ossl_provider_add_to_store()
1094 int lock = 1; in provider_deactivate() local
1105 lock = 0; in provider_deactivate()
1107 if (lock && !CRYPTO_THREAD_read_lock(store->lock)) in provider_deactivate()
1145 if (lock) { in provider_deactivate()
1182 lock = 0; in provider_activate()
1192 if (lock && !CRYPTO_THREAD_read_lock(store->lock)) { in provider_activate()
[all …]
H A Dprovider_child.c26 CRYPTO_RWLOCK *lock; member
46 CRYPTO_THREAD_lock_free(gbl->lock); in ossl_child_prov_ctx_free()
104 if (!CRYPTO_THREAD_write_lock(gbl->lock)) in provider_create_child_cb()
153 CRYPTO_THREAD_unlock(gbl->lock); in provider_create_child_cb()
250 gbl->lock = CRYPTO_THREAD_lock_new(); in ossl_provider_init_as_child()
251 if (gbl->lock == NULL) in ossl_provider_init_as_child()
H A Dprovider_conf.c26 CRYPTO_RWLOCK *lock; member
37 pcgbl->lock = CRYPTO_THREAD_lock_new(); in ossl_prov_conf_ctx_new()
38 if (pcgbl->lock == NULL) { in ossl_prov_conf_ctx_new()
54 CRYPTO_THREAD_lock_free(pcgbl->lock); in ossl_prov_conf_ctx_free()
210 if (pcgbl == NULL || !CRYPTO_THREAD_write_lock(pcgbl->lock)) { in provider_conf_activate()
223 CRYPTO_THREAD_unlock(pcgbl->lock); in provider_conf_activate()
231 CRYPTO_THREAD_unlock(pcgbl->lock); in provider_conf_activate()
270 CRYPTO_THREAD_unlock(pcgbl->lock); in provider_conf_activate()
/openssl/crypto/thread/
H A Dinternal.c33 ossl_crypto_mutex_lock(tdata->lock); in ossl_get_avail_threads()
35 ossl_crypto_mutex_unlock(tdata->lock); in ossl_get_avail_threads()
49 ossl_crypto_mutex_lock(tdata->lock); in ossl_crypto_thread_start()
51 ossl_crypto_mutex_unlock(tdata->lock); in ossl_crypto_thread_start()
58 ossl_crypto_mutex_unlock(tdata->lock); in ossl_crypto_thread_start()
62 ossl_crypto_mutex_lock(tdata->lock); in ossl_crypto_thread_start()
64 ossl_crypto_mutex_unlock(tdata->lock); in ossl_crypto_thread_start()
88 ossl_crypto_mutex_lock(tdata->lock); in ossl_crypto_thread_join()
91 ossl_crypto_mutex_unlock(tdata->lock); in ossl_crypto_thread_join()
134 t->lock = ossl_crypto_mutex_new(); in ossl_threads_ctx_new()
[all …]
H A Dapi.c50 ossl_crypto_mutex_lock(tdata->lock); in OSSL_get_max_threads()
52 ossl_crypto_mutex_unlock(tdata->lock); in OSSL_get_max_threads()
66 ossl_crypto_mutex_lock(tdata->lock); in OSSL_set_max_threads()
68 ossl_crypto_mutex_unlock(tdata->lock); in OSSL_set_max_threads()
/openssl/doc/internal/man3/
H A Dossl_rcu_lock_new.pod74 the lock.
79 the lock.
84 the lock. Note only one writer per lock is permitted, as with read/write locks.
89 by the lock.
150 static CRYPTO_RCU_LOCK *lock;
155 lock = ossl_rcu_lock_new(1);
184 ossl_rcu_write_lock(lock);
206 ossl_rcu_write_unlock(lock);
212 ossl_synchronize_rcu(lock);
228 ossl_rcu_read_lock(lock);
[all …]
/openssl/include/internal/
H A Drcu.h21 void ossl_rcu_lock_free(CRYPTO_RCU_LOCK *lock);
22 void ossl_rcu_read_lock(CRYPTO_RCU_LOCK *lock);
23 void ossl_rcu_write_lock(CRYPTO_RCU_LOCK *lock);
24 void ossl_rcu_write_unlock(CRYPTO_RCU_LOCK *lock);
25 void ossl_rcu_read_unlock(CRYPTO_RCU_LOCK *lock);
26 void ossl_synchronize_rcu(CRYPTO_RCU_LOCK *lock);
27 int ossl_rcu_call(CRYPTO_RCU_LOCK *lock, rcu_cb_fn cb, void *data);
H A Drefcount.h196 CRYPTO_RWLOCK *lock; member
205 return CRYPTO_atomic_add(&refcnt->val, 1, ret, refcnt->lock); in CRYPTO_UP_REF()
211 return CRYPTO_atomic_add(&refcnt->val, -1, ret, refcnt->lock); in CRYPTO_DOWN_REF()
217 return CRYPTO_atomic_load_int(&refcnt->val, ret, refcnt->lock); in CRYPTO_GET_REF()
224 refcnt->lock = CRYPTO_THREAD_lock_new(); in CRYPTO_NEW_REF()
225 if (refcnt->lock == NULL) { in CRYPTO_NEW_REF()
235 CRYPTO_THREAD_lock_free(refcnt->lock); in CRYPTO_FREE_REF()
/openssl/doc/man3/
H A DCRYPTO_THREAD_run_once.pod22 int CRYPTO_THREAD_read_lock(CRYPTO_RWLOCK *lock);
23 int CRYPTO_THREAD_write_lock(CRYPTO_RWLOCK *lock);
24 int CRYPTO_THREAD_unlock(CRYPTO_RWLOCK *lock);
29 CRYPTO_RWLOCK *lock);
31 CRYPTO_RWLOCK *lock);
33 CRYPTO_RWLOCK *lock);
72 lock.
224 static CRYPTO_RWLOCK *lock;
228 lock = CRYPTO_THREAD_lock_new();
235 return CRYPTO_THREAD_write_lock(lock);
[all …]
/openssl/crypto/property/
H A Dproperty_string.c39 CRYPTO_RWLOCK *lock; member
83 CRYPTO_THREAD_lock_free(propdata->lock); in ossl_property_string_data_free()
102 propdata->lock = CRYPTO_THREAD_lock_new(); in ossl_property_string_data_new()
111 if (propdata->lock == NULL in ossl_property_string_data_new()
156 if (!CRYPTO_THREAD_read_lock(propdata->lock)) { in ossl_property_string()
162 CRYPTO_THREAD_unlock(propdata->lock); in ossl_property_string()
176 CRYPTO_THREAD_unlock(propdata->lock); in ossl_property_string()
191 CRYPTO_THREAD_unlock(propdata->lock); in ossl_property_string()
197 CRYPTO_THREAD_unlock(propdata->lock); in ossl_property_string()
226 if (!CRYPTO_THREAD_read_lock(propdata->lock)) { in ossl_property_str()
[all …]
/openssl/providers/implementations/rands/
H A Ddrbg_hmac.c150 if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock)) in drbg_hmac_instantiate_wrapper()
159 if (drbg->lock != NULL) in drbg_hmac_instantiate_wrapper()
160 CRYPTO_THREAD_unlock(drbg->lock); in drbg_hmac_instantiate_wrapper()
281 if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock)) in drbg_hmac_uninstantiate_wrapper()
286 if (drbg->lock != NULL) in drbg_hmac_uninstantiate_wrapper()
298 if (drbg->lock != NULL && !CRYPTO_THREAD_read_lock(drbg->lock)) in drbg_hmac_verify_zeroization()
306 if (drbg->lock != NULL) in drbg_hmac_verify_zeroization()
370 if (drbg->lock != NULL && !CRYPTO_THREAD_read_lock(drbg->lock)) in drbg_hmac_get_ctx_params()
391 if (drbg->lock != NULL) in drbg_hmac_get_ctx_params()
456 if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock)) in drbg_hmac_set_ctx_params()
[all …]
H A Ddrbg_hash.c277 if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock)) in drbg_hash_instantiate_wrapper()
286 if (drbg->lock != NULL) in drbg_hash_instantiate_wrapper()
287 CRYPTO_THREAD_unlock(drbg->lock); in drbg_hash_instantiate_wrapper()
388 if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock)) in drbg_hash_uninstantiate_wrapper()
393 if (drbg->lock != NULL) in drbg_hash_uninstantiate_wrapper()
405 if (drbg->lock != NULL && !CRYPTO_THREAD_read_lock(drbg->lock)) in drbg_hash_verify_zeroization()
414 if (drbg->lock != NULL) in drbg_hash_verify_zeroization()
477 if (drbg->lock != NULL && !CRYPTO_THREAD_read_lock(drbg->lock)) in drbg_hash_get_ctx_params()
489 if (drbg->lock != NULL) in drbg_hash_get_ctx_params()
553 if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock)) in drbg_hash_set_ctx_params()
[all …]
H A Ddrbg_ctr.c337 if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock)) in drbg_ctr_instantiate_wrapper()
346 if (drbg->lock != NULL) in drbg_ctr_instantiate_wrapper()
347 CRYPTO_THREAD_unlock(drbg->lock); in drbg_ctr_instantiate_wrapper()
490 if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock)) in drbg_ctr_uninstantiate_wrapper()
495 if (drbg->lock != NULL) in drbg_ctr_uninstantiate_wrapper()
507 if (drbg->lock != NULL && !CRYPTO_THREAD_read_lock(drbg->lock)) in drbg_ctr_verify_zeroization()
519 if (drbg->lock != NULL) in drbg_ctr_verify_zeroization()
671 if (drbg->lock != NULL && !CRYPTO_THREAD_read_lock(drbg->lock)) in drbg_ctr_get_ctx_params()
688 if (drbg->lock != NULL) in drbg_ctr_get_ctx_params()
769 if (drbg->lock != NULL && !CRYPTO_THREAD_write_lock(drbg->lock)) in drbg_ctr_set_ctx_params()
[all …]
H A Dtest_rng.c50 CRYPTO_RWLOCK *lock; member
77 CRYPTO_THREAD_lock_free(t->lock); in test_rng_free()
304 if (t != NULL && t->lock == NULL) { in test_rng_enable_locking()
305 t->lock = CRYPTO_THREAD_lock_new(); in test_rng_enable_locking()
306 if (t->lock == NULL) { in test_rng_enable_locking()
318 if (t == NULL || t->lock == NULL) in test_rng_lock()
320 return CRYPTO_THREAD_write_lock(t->lock); in test_rng_lock()
327 if (t != NULL && t->lock != NULL) in test_rng_unlock()
328 CRYPTO_THREAD_unlock(t->lock); in test_rng_unlock()
H A Dfips_crng_test.c53 CRYPTO_RWLOCK *lock; member
226 CRYPTO_THREAD_lock_free(crngt->lock); in crng_test_free()
334 if (crngt != NULL && crngt->lock == NULL) { in crng_test_enable_locking()
340 crngt->lock = CRYPTO_THREAD_lock_new(); in crng_test_enable_locking()
341 if (crngt->lock == NULL) { in crng_test_enable_locking()
353 return crngt->lock == NULL || CRYPTO_THREAD_write_lock(crngt->lock); in crng_test_lock()
360 if (crngt->lock != NULL) in crng_test_unlock()
361 CRYPTO_THREAD_unlock(crngt->lock); in crng_test_unlock()
/openssl/crypto/x509/
H A Dby_dir.c48 CRYPTO_RWLOCK *lock; member
120 a->lock = CRYPTO_THREAD_lock_new(); in new_dir()
121 if (a->lock == NULL) { in new_dir()
162 CRYPTO_THREAD_lock_free(a->lock); in free_dir()
276 if (!CRYPTO_THREAD_read_lock(ctx->lock)) in get_cert_by_subject_ex()
286 CRYPTO_THREAD_unlock(ctx->lock); in get_cert_by_subject_ex()
366 if (!CRYPTO_THREAD_write_lock(ctx->lock)) in get_cert_by_subject_ex()
380 CRYPTO_THREAD_unlock(ctx->lock); in get_cert_by_subject_ex()
387 CRYPTO_THREAD_unlock(ctx->lock); in get_cert_by_subject_ex()
403 CRYPTO_THREAD_unlock(ctx->lock); in get_cert_by_subject_ex()
/openssl/crypto/bio/
H A Dbss_dgram_pair.c264 CRYPTO_RWLOCK *lock; member
286 b->lock = CRYPTO_THREAD_lock_new(); in dgram_pair_init()
287 if (b->lock == NULL) { in dgram_pair_init()
330 CRYPTO_THREAD_lock_free(b->lock); in dgram_pair_free()
515 CRYPTO_THREAD_unlock(readb->lock); in dgram_pair_ctrl_pending()
543 CRYPTO_THREAD_unlock(b->lock); in dgram_pair_ctrl_get_write_guarantee()
986 CRYPTO_THREAD_unlock(a->lock); in dgram_pair_unlock_both()
987 CRYPTO_THREAD_unlock(b->lock); in dgram_pair_unlock_both()
1118 CRYPTO_THREAD_unlock(b->lock); in dgram_mem_read()
1278 CRYPTO_THREAD_unlock(b->lock); in dgram_pair_write()
[all …]
/openssl/crypto/asn1/
H A Dtasn_utl.c71 CRYPTO_RWLOCK **lock; in ossl_asn1_do_lock() local
81 lock = offset2ptr(*pval, aux->ref_lock); in ossl_asn1_do_lock()
88 *lock = CRYPTO_THREAD_lock_new(); in ossl_asn1_do_lock()
89 if (*lock == NULL) { in ossl_asn1_do_lock()
106 CRYPTO_THREAD_lock_free(*lock); in ossl_asn1_do_lock()
107 *lock = NULL; in ossl_asn1_do_lock()
/openssl/crypto/hashtable/
H A Dhashtable.c155 CRYPTO_RCU_LOCK *lock; member
227 new->lock = ossl_rcu_lock_new(1, conf->ctx); in ossl_ht_new()
228 if (new->lock == NULL) in ossl_ht_new()
238 ossl_rcu_lock_free(new->lock); in ossl_ht_new()
248 ossl_rcu_read_lock(htable->lock); in ossl_ht_read_lock()
253 ossl_rcu_read_unlock(htable->lock); in ossl_ht_read_unlock()
258 ossl_rcu_write_lock(htable->lock); in ossl_ht_write_lock()
267 ossl_rcu_write_unlock(htable->lock); in ossl_ht_write_unlock()
269 ossl_synchronize_rcu(htable->lock); in ossl_ht_write_unlock()
320 ossl_rcu_call(h->lock, free_oldmd, oldmd); in ossl_ht_flush_internal()
[all …]
/openssl/crypto/objects/
H A Dobj_dat.c83 static ossl_inline int ossl_obj_write_lock(int lock) in ossl_obj_write_lock() argument
85 if (!lock) in ossl_obj_write_lock()
92 static ossl_inline int ossl_obj_read_lock(int lock) in ossl_obj_read_lock() argument
94 if (!lock) in ossl_obj_read_lock()
101 static ossl_inline void ossl_obj_unlock(int lock) in ossl_obj_unlock() argument
103 if (lock) in ossl_obj_unlock()
281 if (!ossl_obj_write_lock(lock)) { in ossl_obj_add_object()
318 ossl_obj_unlock(lock); in ossl_obj_add_object()
322 ossl_obj_unlock(lock); in ossl_obj_add_object()
402 if (!ossl_obj_read_lock(lock)) { in ossl_obj_obj2nid()
[all …]

Completed in 63 milliseconds

1234