Lines Matching refs:lock

22  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);
25 void CRYPTO_THREAD_lock_free(CRYPTO_RWLOCK *lock);
27 int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock);
29 CRYPTO_RWLOCK *lock);
30 int CRYPTO_atomic_load(uint64_t *val, uint64_t *ret, CRYPTO_RWLOCK *lock);
31 int CRYPTO_atomic_store(uint64_t *dst, uint64_t val, CRYPTO_RWLOCK *lock);
32 int CRYPTO_atomic_load_int(int *val, int *ret, CRYPTO_RWLOCK *lock);
68 lock.
72 CRYPTO_THREAD_read_lock() locks the provided I<lock> for reading.
76 CRYPTO_THREAD_write_lock() locks the provided I<lock> for writing.
80 CRYPTO_THREAD_unlock() unlocks the previously locked I<lock>.
84 CRYPTO_THREAD_lock_free() frees the provided I<lock>.
89 result of the operation in I<*ret>. I<lock> will be locked, unless atomic
93 supported and I<lock> is NULL, then the function will fail.
99 I<*ret>. I<lock> will be locked, unless atomic operations are supported on the
103 supported and I<lock> is NULL, then the function will fail.
108 I<lock> will be locked, unless atomic operations are supported on the specific
111 the variable is read. If atomic operations are not supported and I<lock> is
117 I<lock> will be locked, unless atomic operations are supported on the specific
152 CRYPTO_THREAD_lock_new() returns the allocated lock, or NULL on error.
192 This example safely initializes and uses a lock.
200 static CRYPTO_RWLOCK *lock;
204 lock = CRYPTO_THREAD_lock_new();
209 if (!CRYPTO_THREAD_run_once(&once, void init) || lock == NULL)
211 return CRYPTO_THREAD_write_lock(lock);
216 return CRYPTO_THREAD_unlock(lock);
224 /* Your code here, do not return without releasing the lock! */
234 The simplest solution is to just "leak" the lock in applications and not