Lines Matching refs:lock
29 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()
35 void ossl_rcu_lock_free(CRYPTO_RCU_LOCK *lock) in ossl_rcu_lock_free() argument
37 OPENSSL_free(lock); in ossl_rcu_lock_free()
40 void ossl_rcu_read_lock(CRYPTO_RCU_LOCK *lock) in ossl_rcu_read_lock() argument
45 void ossl_rcu_write_lock(CRYPTO_RCU_LOCK *lock) in ossl_rcu_write_lock() argument
50 void ossl_rcu_write_unlock(CRYPTO_RCU_LOCK *lock) in ossl_rcu_write_unlock() argument
55 void ossl_rcu_read_unlock(CRYPTO_RCU_LOCK *lock) in ossl_rcu_read_unlock() argument
60 void ossl_synchronize_rcu(CRYPTO_RCU_LOCK *lock) in ossl_synchronize_rcu() argument
62 struct rcu_cb_item *items = lock->cb_items; in ossl_synchronize_rcu()
65 lock->cb_items = NULL; in ossl_synchronize_rcu()
75 int ossl_rcu_call(CRYPTO_RCU_LOCK *lock, rcu_cb_fn cb, void *data) in ossl_rcu_call() argument
84 new->next = lock->cb_items; in ossl_rcu_call()
85 lock->cb_items = new; in ossl_rcu_call()
101 CRYPTO_RWLOCK *lock; in CRYPTO_THREAD_lock_new() local
103 if ((lock = CRYPTO_zalloc(sizeof(unsigned int), NULL, 0)) == NULL) in CRYPTO_THREAD_lock_new()
107 *(unsigned int *)lock = 1; in CRYPTO_THREAD_lock_new()
109 return lock; in CRYPTO_THREAD_lock_new()
112 __owur int CRYPTO_THREAD_read_lock(CRYPTO_RWLOCK *lock) in CRYPTO_THREAD_read_lock() argument
114 if (!ossl_assert(*(unsigned int *)lock == 1)) in CRYPTO_THREAD_read_lock()
119 __owur int CRYPTO_THREAD_write_lock(CRYPTO_RWLOCK *lock) in CRYPTO_THREAD_write_lock() argument
121 if (!ossl_assert(*(unsigned int *)lock == 1)) in CRYPTO_THREAD_write_lock()
126 int CRYPTO_THREAD_unlock(CRYPTO_RWLOCK *lock) in CRYPTO_THREAD_unlock() argument
128 if (!ossl_assert(*(unsigned int *)lock == 1)) in CRYPTO_THREAD_unlock()
133 void CRYPTO_THREAD_lock_free(CRYPTO_RWLOCK *lock) { in CRYPTO_THREAD_lock_free() argument
134 if (lock == NULL) in CRYPTO_THREAD_lock_free()
137 *(unsigned int *)lock = 0; in CRYPTO_THREAD_lock_free()
138 OPENSSL_free(lock); in CRYPTO_THREAD_lock_free()
206 int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock) in CRYPTO_atomic_add() argument
215 CRYPTO_RWLOCK *lock) in CRYPTO_atomic_add64() argument
224 CRYPTO_RWLOCK *lock) in CRYPTO_atomic_and() argument
233 CRYPTO_RWLOCK *lock) in CRYPTO_atomic_or() argument
241 int CRYPTO_atomic_load(uint64_t *val, uint64_t *ret, CRYPTO_RWLOCK *lock) in CRYPTO_atomic_load() argument
248 int CRYPTO_atomic_store(uint64_t *dst, uint64_t val, CRYPTO_RWLOCK *lock) in CRYPTO_atomic_store() argument
255 int CRYPTO_atomic_load_int(int *val, int *ret, CRYPTO_RWLOCK *lock) in CRYPTO_atomic_load_int() argument