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);
31 CRYPTO_RWLOCK *lock);
33 CRYPTO_RWLOCK *lock);
34 int CRYPTO_atomic_load(uint64_t *val, uint64_t *ret, CRYPTO_RWLOCK *lock);
35 int CRYPTO_atomic_store(uint64_t *dst, uint64_t val, CRYPTO_RWLOCK *lock);
36 int CRYPTO_atomic_load_int(int *val, int *ret, CRYPTO_RWLOCK *lock);
72 lock.
76 CRYPTO_THREAD_read_lock() locks the provided I<lock> for reading.
80 CRYPTO_THREAD_write_lock() locks the provided I<lock> for writing.
84 CRYPTO_THREAD_unlock() unlocks the previously locked I<lock>.
88 CRYPTO_THREAD_lock_free() frees the provided I<lock>.
94 result of the operation in I<*ret>. I<lock> will be locked, unless atomic
98 supported and I<lock> is NULL, then the function will fail.
103 result of the operation in I<*ret>. I<lock> will be locked, unless atomic
107 supported and I<lock> is NULL, then the function will fail.
113 I<*ret>. I<lock> will be locked, unless atomic operations are supported on the
117 supported and I<lock> is NULL, then the function will fail.
123 I<*ret>. I<lock> will be locked, unless atomic operations are supported on the
127 supported and I<lock> is NULL, then the function will fail.
132 I<lock> will be locked, unless atomic operations are supported on the specific
135 the variable is read. If atomic operations are not supported and I<lock> is
141 I<lock> will be locked, unless atomic operations are supported on the specific
176 CRYPTO_THREAD_lock_new() returns the allocated lock, or NULL on error.
216 This example safely initializes and uses a lock.
224 static CRYPTO_RWLOCK *lock;
228 lock = CRYPTO_THREAD_lock_new();
233 if (!CRYPTO_THREAD_run_once(&once, void init) || lock == NULL)
235 return CRYPTO_THREAD_write_lock(lock);
240 return CRYPTO_THREAD_unlock(lock);
248 /* Do not unlock unless the lock was successfully acquired. */
252 /* Your code here, do not return without releasing the lock! */
261 The simplest solution is to just "leak" the lock in applications and not