Home
last modified time | relevance | path

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

12345678910>>...13

/glibc-2.36/htl/tests/
Dtest-11.c36 pthread_rwlock_t *lock = arg; in test1() local
41 err = pthread_rwlock_rdlock (lock); in test1()
50 err = pthread_rwlock_unlock (lock); in test1()
62 pthread_rwlock_t lock; in main() local
84 err = pthread_rwlock_init (&lock, &attr); in main()
96 err = pthread_create (&tid[i], 0, test1, &lock); in main()
106 pthread_rwlock_wrlock (&lock); in main()
115 pthread_rwlock_unlock (&lock); in main()
126 err = pthread_rwlock_tryrdlock (&lock); in main()
130 err = pthread_rwlock_trywrlock (&lock); in main()
[all …]
/glibc-2.36/nptl/
DDESIGN-systemtap-probes.txt26 arg1 = address of mutex lock
28 arg1 = address of mutex lock
30 arg1 = address of mutex lock
32 arg1 = address of mutex lock
34 arg1 = address of mutex lock, arg2 = address of timespec
36 arg1 = address of mutex lock, arg2 = clockid,
39 mutex lock
40 arg1 = address of mutex lock
42 arg1 = address of mutex lock
45 arg1 = address of rw lock
[all …]
Dtst-rwlock20.c43 static pthread_rwlock_t lock; variable
63 xpthread_rwlock_wrlock (&lock); in tf()
64 xpthread_rwlock_unlock (&lock); in tf()
69 xpthread_rwlock_rdlock (&lock); in tf()
70 xpthread_rwlock_unlock (&lock); in tf()
92 xpthread_rwlock_init (&lock, &attr); in do_test()
Dtst-rwlock9.c48 static pthread_rwlock_t lock; variable
83 ? pthread_rwlock_timedwrlock (&lock, &ts) in writer_thread()
84 : pthread_rwlock_clockwrlock (&lock, clockid, &ts); in writer_thread()
94 if (pthread_rwlock_unlock (&lock) != 0) in writer_thread()
129 e = pthread_rwlock_timedrdlock (&lock, &ts); in reader_thread()
131 e = pthread_rwlock_clockrdlock (&lock, clockid, &ts); in reader_thread()
141 if (pthread_rwlock_unlock (&lock) != 0) in reader_thread()
165 if (pthread_rwlock_init (&lock, &a) != 0) in do_test_clock()
Dpthread_spin_lock.c24 __pthread_spin_lock (pthread_spinlock_t *lock) in __pthread_spin_lock() argument
43 if (__glibc_likely (atomic_exchange_acquire (lock, 1) == 0)) in __pthread_spin_lock()
49 if (__glibc_likely (atomic_compare_exchange_weak_acquire (lock, &val, 1))) in __pthread_spin_lock()
71 val = atomic_load_relaxed (lock); in __pthread_spin_lock()
78 while (!atomic_compare_exchange_weak_acquire (lock, &val, 1)); in __pthread_spin_lock()
Dtst-rwlock8.c38 static pthread_rwlock_t lock; variable
54 if (pthread_rwlock_wrlock (&lock) != 0) in writer_thread()
64 if (pthread_rwlock_unlock (&lock) != 0) in writer_thread()
90 if (pthread_rwlock_rdlock (&lock) != 0) in reader_thread()
100 if (pthread_rwlock_unlock (&lock) != 0) in reader_thread()
134 if (pthread_rwlock_init (&lock, &a) != 0) in do_test()
/glibc-2.36/mach/
Dspin-lock.h27 #define spin_lock_init(lock) __spin_lock_init (lock) argument
28 #define spin_lock(lock) __spin_lock (lock) argument
29 #define spin_try_lock(lock) __spin_try_lock (lock) argument
30 #define spin_unlock(lock) __spin_unlock (lock) argument
31 #define spin_lock_locked(lock) __spin_lock_locked (lock) argument
/glibc-2.36/sysdeps/x86/
Datomic-machine.h178 #define __arch_exchange_and_add_body(lock, pfx, mem, value) \ argument
182 __asm __volatile (lock "xaddb %b0, %1" \
187 __asm __volatile (lock "xaddw %w0, %1" \
192 __asm __volatile (lock "xaddl %0, %1" \
197 __asm __volatile (lock "xaddq %q0, %1" \
217 #define __arch_add_body(lock, pfx, apfx, mem, value) \ argument
224 __asm __volatile (lock "addb %b1, %0" \
229 __asm __volatile (lock "addw %w1, %0" \
234 __asm __volatile (lock "addl %1, %0" \
239 __asm __volatile (lock "addq %q1, %0" \
[all …]
/glibc-2.36/sysdeps/pthread/
Dtst-cond18.c28 pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; variable
36 pthread_mutex_lock (&lock); in tf()
44 pthread_mutex_unlock (&lock); in tf()
46 pthread_mutex_lock (&lock); in tf()
63 pthread_cond_wait (&cv, &lock); in tf()
65 pthread_mutex_unlock (&lock); in tf()
67 pthread_mutex_lock (&lock); in tf()
71 pthread_mutex_unlock (&lock); in tf()
107 pthread_mutex_lock (&lock); in do_test()
109 pthread_mutex_unlock (&lock); in do_test()
Dtst-spin4.c11 pthread_spinlock_t *lock = (pthread_spinlock_t *) arg; in thread_add_one() local
15 if (pthread_spin_lock (lock) != 0) in thread_add_one()
26 if (pthread_spin_unlock (lock) != 0) in thread_add_one()
39 pthread_spinlock_t lock; in do_test() local
42 if (pthread_spin_init (&lock, PTHREAD_PROCESS_PRIVATE) != 0) in do_test()
48 if (pthread_spin_lock (&lock) != 0) in do_test()
54 if (pthread_create (&thr1, NULL, thread_add_one, (void *) &lock) != 0) in do_test()
60 if (pthread_create (&thr2, NULL, thread_add_one, (void *) &lock) != 0) in do_test()
71 if (pthread_spin_unlock (&lock) != 0) in do_test()
Dtst-cond16.c27 pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; variable
39 pthread_mutex_lock (&lock); in tf()
41 pthread_cond_wait (&cv, &lock); in tf()
43 pthread_mutex_unlock (&lock); in tf()
47 pthread_mutex_lock (&lock); in tf()
53 pthread_mutex_unlock (&lock); in tf()
55 pthread_mutex_unlock (&lock); in tf()
94 pthread_mutex_lock (&lock); in do_test()
96 pthread_mutex_unlock (&lock); in do_test()
Dtst-cond7.c31 pthread_mutex_t lock; member
53 if (pthread_mutex_lock (&t->lock) != 0) in tf()
67 if (pthread_cond_wait (&t->cond, &t->lock) != 0) in tf()
73 if (pthread_mutex_unlock (&t->lock) != 0) in tf()
100 if (pthread_mutex_init (&t[i]->lock, NULL) != 0 in do_test()
107 if (pthread_mutex_lock (&t[i]->lock) != 0) in do_test()
122 if (pthread_cond_wait (&t[i]->cond, &t[i]->lock) != 0) in do_test()
130 if (pthread_mutex_unlock (&t[i]->lock) != 0) in do_test()
Dtst-mutex7.c46 static pthread_mutex_t lock; variable
62 if (pthread_mutex_lock (&lock) != 0) in tf()
68 if (pthread_mutex_unlock (&lock) != 0) in tf()
115 int e = pthread_mutex_init (&lock, &a); in do_test()
151 if (pthread_mutex_lock (&lock) != 0) in do_test()
170 if (pthread_mutex_unlock (&lock) != 0) in do_test()
/glibc-2.36/posix/
Dregex_internal.h52 # define lock_init(lock) (__libc_lock_init (lock), 0) argument
53 # define lock_fini(lock) ((void) 0) argument
54 # define lock_lock(lock) __libc_lock_lock (lock) argument
55 # define lock_unlock(lock) __libc_lock_unlock (lock) argument
59 # define lock_init(lock) glthread_lock_init (&(lock)) argument
60 # define lock_fini(lock) glthread_lock_destroy (&(lock)) argument
61 # define lock_lock(lock) glthread_lock_lock (&(lock)) argument
62 # define lock_unlock(lock) glthread_lock_unlock (&(lock)) argument
66 # define lock_init(lock) pthread_mutex_init (&(lock), 0) argument
67 # define lock_fini(lock) pthread_mutex_destroy (&(lock)) argument
[all …]
/glibc-2.36/stdlib/
Drandom.c197 __libc_lock_define_initialized (static, lock) in __libc_lock_define_initialized() argument
210 __libc_lock_lock (lock); in __libc_lock_define_initialized()
212 __libc_lock_unlock (lock); in __libc_lock_define_initialized()
235 __libc_lock_lock (lock); in weak_alias()
241 __libc_lock_unlock (lock); in weak_alias()
261 __libc_lock_lock (lock); in weak_alias()
268 __libc_lock_unlock (lock); in weak_alias()
291 __libc_lock_lock (lock); in weak_alias()
295 __libc_lock_unlock (lock); in weak_alias()
/glibc-2.36/sysdeps/nptl/
Dlowlevellock.h68 #define __lll_trylock(lock) \ argument
69 __glibc_unlikely (atomic_compare_and_exchange_bool_acq ((lock), 1, 0))
70 #define lll_trylock(lock) \ argument
71 __lll_trylock (&(lock))
76 #define lll_cond_trylock(lock) \ argument
77 __glibc_unlikely (atomic_compare_and_exchange_bool_acq (&(lock), 2, 0))
195 extern int __lll_unlock_elision (int *lock, short *adapt_count, int private);
197 extern int __lll_unlock_elision (int *lock, int private);
201 extern int __lll_trylock_elision (int *lock, short *adapt_count);
267 # define lll_lock_elision(lock, try_lock, private) \
[all …]
/glibc-2.36/hurd/hurd/
Dport.h38 spin_lock_t lock; /* Locks rest. */ member
70 __spin_lock_init (&port->lock); in _hurd_port_init()
102 __spin_unlock (&port->lock); in _hurd_port_locked_get()
122 __spin_lock (&port->lock); in _hurd_port_get()
147 __spin_lock (&port->lock); in _hurd_port_move()
149 __spin_unlock (&port->lock); in _hurd_port_move()
177 __spin_lock (&port->lock); in _hurd_port_free()
179 __spin_unlock (&port->lock); in _hurd_port_free()
201 __spin_unlock (&port->lock); in _hurd_port_locked_set()
218 __spin_lock (&port->lock); in _hurd_port_set()
/glibc-2.36/hurd/
Dhurdmalloc.c129 spin_lock_t lock; /* spin lock for mutual exclusion */ member
158 spin_lock_init (&malloc_free_list[i].lock); in malloc_init()
221 spin_lock(&fl->lock); in malloc()
234 spin_unlock(&fl->lock); in malloc()
251 spin_unlock(&fl->lock); in malloc()
299 spin_lock(&fl->lock); in free()
308 spin_unlock(&fl->lock); in free()
387 spin_lock(&fl->lock); in print_malloc_free_list()
396 spin_unlock(&fl->lock); in print_malloc_free_list()
413 spin_lock(&malloc_free_list[i].lock); in _hurd_malloc_fork_prepare()
[all …]
Dcatch-signal.c56 __spin_lock (&ss->lock); in __hurd_catch_signal()
59 __spin_unlock (&ss->lock); in __hurd_catch_signal()
69 __spin_lock (&ss->lock); in __hurd_catch_signal()
72 __spin_unlock (&ss->lock); in __hurd_catch_signal()
149 __spin_lock (&ss->lock); in hurd_safe_memmove()
152 __spin_unlock (&ss->lock); in hurd_safe_memmove()
162 __spin_lock (&ss->lock); in hurd_safe_memmove()
165 __spin_unlock (&ss->lock); in hurd_safe_memmove()
/glibc-2.36/nss/
Dnss_database.c35 __libc_lock_define (, lock);
61 __libc_lock_init (result->lock); in global_state_allocate()
413 __libc_lock_lock (local->lock); in nss_database_check_reload_and_get()
419 __libc_lock_unlock (local->lock); in nss_database_check_reload_and_get()
439 __libc_lock_unlock (local->lock); in nss_database_check_reload_and_get()
449 __libc_lock_unlock (local->lock); in nss_database_check_reload_and_get()
461 __libc_lock_lock (local->lock); in nss_database_check_reload_and_get()
471 __libc_lock_unlock (local->lock); in nss_database_check_reload_and_get()
492 __libc_lock_lock (local->lock); in libc_hidden_def()
494 __libc_lock_unlock (local->lock); in libc_hidden_def()
[all …]
/glibc-2.36/misc/
Dunwind-link.c37 __libc_lock_define (static, lock);
53 __libc_lock_unlock (lock); in __libc_unwind_link_get()
102 __libc_lock_lock (lock); in __libc_unwind_link_get()
114 __libc_lock_unlock (lock); in __libc_unwind_link_get()
122 if (__libc_lock_trylock (lock) == 0) in libc_hidden_def()
125 __libc_lock_unlock (lock); in libc_hidden_def()
130 __libc_lock_init (lock); in libc_hidden_def()
/glibc-2.36/rt/
Dtst-timer4.c33 pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; variable
45 pthread_mutex_lock (&lock); in thr1()
55 pthread_mutex_unlock (&lock); in thr1()
91 pthread_mutex_lock (&lock); in thr2()
102 pthread_mutex_unlock (&lock); in thr2()
386 pthread_mutex_lock (&lock); in do_test()
388 pthread_cond_wait (&cond, &lock); in do_test()
389 pthread_mutex_unlock (&lock); in do_test()
398 pthread_mutex_lock (&lock); in do_test()
442 pthread_mutex_unlock (&lock); in do_test()
[all …]
/glibc-2.36/nscd/
Dselinux.c87 static void avc_get_lock (void *lock);
88 static void avc_release_lock (void *lock);
89 static void avc_free_lock (void *lock);
300 avc_get_lock (void *lock) in avc_get_lock() argument
302 pthread_mutex_lock (lock); in avc_get_lock()
308 avc_release_lock (void *lock) in avc_release_lock() argument
310 pthread_mutex_unlock (lock); in avc_release_lock()
316 avc_free_lock (void *lock) in avc_free_lock() argument
318 pthread_mutex_destroy (lock); in avc_free_lock()
319 free (lock); in avc_free_lock()
/glibc-2.36/sysdeps/mach/hurd/
Dprofil.c38 static spin_lock_t lock = SPIN_LOCK_INITIALIZER; variable
116 __spin_lock (&lock); in libc_hidden_def()
137 __spin_unlock (&lock); in libc_hidden_def()
194 __spin_lock (&lock); in profile_waiter()
198 __spin_unlock (&lock); in profile_waiter()
211 __spin_lock (&lock); in fork_profil_prepare()
219 __spin_unlock (&lock); in fork_profil_parent()
232 __spin_unlock (&lock); in fork_profil_child()
/glibc-2.36/sysdeps/mach/
Dlibc-lock.h30 __libc_lock_t lock; member
111 else if ((__r = lll_trylock (__lock->lock)) == 0) \
122 lll_lock (__lock->lock, 0); \
135 lll_unlock (__lock->lock, 0); \
197 __libc_lock_t lock; member
207 __libc_lock_lock (ONCE_CONTROL.lock); \
211 __libc_lock_unlock (ONCE_CONTROL.lock); \

12345678910>>...13