Home
last modified time | relevance | path

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

1234

/sysdeps/pthread/
A 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()
A 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()
A 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()
A 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()
A Dtst-join1.c23 static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; variable
32 if (pthread_mutex_unlock (&lock) != 0) in tf()
59 if (pthread_mutex_lock (&lock) != 0) in do_test()
71 if (pthread_mutex_lock (&lock) != 0) in do_test()
A Dtst-join3.c32 static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; variable
38 xpthread_mutex_lock (&lock); in tf()
39 xpthread_mutex_unlock (&lock); in tf()
51 xpthread_mutex_lock (&lock); in do_test_clock()
66 xpthread_mutex_unlock (&lock); in do_test_clock()
A Dtst-flock1.c25 static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; variable
39 pthread_mutex_unlock (&lock); in tf()
67 pthread_mutex_lock (&lock); in do_test()
76 pthread_mutex_lock (&lock); in do_test()
A Dtst-basic2.c28 static pthread_mutex_t lock[N]; variable
35 pthread_mutex_lock (&lock[idx]); in tf()
67 if (pthread_mutex_init (&lock[i], NULL) != 0) in do_test()
73 if (pthread_mutex_lock (&lock[i]) != 0) in do_test()
85 if (pthread_mutex_unlock (&lock[i]) != 0) in do_test()
A Dtst-join2.c26 static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; variable
32 if (pthread_mutex_lock (&lock) != 0) in tf()
47 if (pthread_mutex_lock (&lock) != 0) in do_test()
72 if (pthread_mutex_unlock (&lock) != 0) in do_test()
A 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()
/sysdeps/mach/htl/
A Dpt-spin.c22 extern void __spin_lock_solid (__spin_lock_t *lock);
27 _pthread_spin_lock (__spin_lock_t *lock) in _pthread_spin_lock() argument
29 __spin_lock_solid (lock); in _pthread_spin_lock()
/sysdeps/unix/sysv/linux/x86/
A Delision-unlock.c24 __lll_unlock_elision(int *lock, int private) in __lll_unlock_elision() argument
28 if (*lock == 0) in __lll_unlock_elision()
31 lll_unlock ((*lock), private); in __lll_unlock_elision()
/sysdeps/unix/sysv/linux/powerpc/
A Delision-unlock.c24 __lll_unlock_elision (int *lock, short *adapt_count, int pshared) in __lll_unlock_elision() argument
27 if (*lock == 0) in __lll_unlock_elision()
40 lll_unlock ((*lock), pshared); in __lll_unlock_elision()
A Delision-lock.c40 __lll_lock_elision (int *lock, short *adapt_count, EXTRAARG int pshared) in __lll_lock_elision() argument
53 if (*lock == 0) in __lll_lock_elision()
79 return LLL_LOCK ((*lock), pshared); in __lll_lock_elision()
/sysdeps/unix/sysv/linux/
A Dtst-o_path-locks.c41 struct flock64 lock = { .l_type = F_WRLCK, }; in subprocess() local
42 int ret = fcntl64 (fd, F_SETLK, &lock); in subprocess()
78 struct flock64 lock = { .l_type = F_WRLCK, }; in do_test() local
79 TEST_COMPARE (fcntl64 (fd, F_SETLK, &lock), 0); in do_test()
90 TEST_COMPARE (fcntl64 (fd, F_SETLK, &lock), 0); in do_test()
A Dtelldir.c28 __libc_lock_lock (dirp->lock); in telldir()
30 __libc_lock_unlock (dirp->lock); in telldir()
/sysdeps/nptl/
A 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 …]
A Dstdio-lock.h26 typedef struct { int lock; int cnt; void *owner; } _IO_lock_t; member
42 lll_lock ((_name).lock, LLL_PRIVATE); \
54 if (lll_trylock ((_name).lock) == 0) \
72 lll_unlock ((_name).lock, LLL_PRIVATE); \
/sysdeps/sparc/nptl/
A Dsparc-nptl.h9 int lock; member
20 unsigned char lock; member
29 unsigned char lock; member
/sysdeps/x86/
A Datomic-machine.h306 #define __arch_increment_body(lock, pfx, mem) \ argument
309 __asm __volatile (lock "incb %b0" \
314 __asm __volatile (lock "incw %w0" \
319 __asm __volatile (lock "incl %0" \
324 __asm __volatile (lock "incq %q0" \
364 #define __arch_decrement_body(lock, pfx, mem) \ argument
367 __asm __volatile (lock "decb %b0" \
372 __asm __volatile (lock "decw %w0" \
377 __asm __volatile (lock "decl %0" \
470 #define __arch_and_body(lock, mem, mask) \ argument
[all …]
/sysdeps/mach/hurd/
A Dgetgroups.c36 __mutex_lock (&_hurd_id.lock); in __getgroups()
40 __mutex_unlock (&_hurd_id.lock); in __getgroups()
55 __mutex_unlock (&_hurd_id.lock); in __getgroups()
66 __mutex_unlock (&_hurd_id.lock); in __getgroups()
A Dsigaltstack.c37 __spin_lock (&s->lock); in __sigaltstack()
44 __spin_unlock (&s->lock); in __sigaltstack()
54 __spin_unlock (&s->lock); in __sigaltstack()
/sysdeps/powerpc/nptl/
A Dpthread_spin_unlock.c24 __pthread_spin_unlock (pthread_spinlock_t *lock) in __pthread_spin_unlock() argument
26 atomic_store_release (lock, 0); in __pthread_spin_unlock()
/sysdeps/ia64/nptl/
A Dpthread_spin_unlock.c22 __pthread_spin_unlock (pthread_spinlock_t *lock) in __pthread_spin_unlock() argument
24 __sync_lock_release ((int *) lock); in __pthread_spin_unlock()
/sysdeps/hppa/nptl/
A Dpthread_spin_unlock.c22 __pthread_spin_unlock (pthread_spinlock_t *lock) in __pthread_spin_unlock() argument
43 atomic_exchange_rel (lock, 0); in __pthread_spin_unlock()

Completed in 29 milliseconds

1234