Home
last modified time | relevance | path

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

12

/bionic/libc/kernel/common/linux/
Dspinlock_api_up.h21 #define assert_spin_locked(lock) do { (void)(lock); } while (0) argument
23 #define __LOCK(lock) do { preempt_disable(); __acquire(lock); (void)(lock); } while (0) argument
25 #define __LOCK_BH(lock) do { local_bh_disable(); __LOCK(lock); } while (0) argument
27 #define __LOCK_IRQ(lock) do { local_irq_disable(); __LOCK(lock); } while (0) argument
29 #define __LOCK_IRQSAVE(lock, flags) do { local_irq_save(flags); __LOCK(lock); } while (0) argument
31 #define __UNLOCK(lock) do { preempt_enable(); __release(lock); (void)(lock); } while (0) argument
33 #define __UNLOCK_BH(lock) do { preempt_enable_no_resched(); local_bh_enable(); __release(lock); (… argument
35 #define __UNLOCK_IRQ(lock) do { local_irq_enable(); __UNLOCK(lock); } while (0) argument
37 #define __UNLOCK_IRQRESTORE(lock, flags) do { local_irq_restore(flags); __UNLOCK(lock); } while (… argument
39 #define _spin_lock(lock) __LOCK(lock) argument
[all …]
Dspinlock.h36 #define spin_lock_init(lock) do { *(lock) = SPIN_LOCK_UNLOCKED; } while (0) argument
38 #define rwlock_init(lock) do { *(lock) = RW_LOCK_UNLOCKED; } while (0) argument
40 #define spin_is_locked(lock) __raw_spin_is_locked(&(lock)->raw_lock) argument
42 #define spin_unlock_wait(lock) __raw_spin_unlock_wait(&(lock)->raw_lock) argument
46 #define _raw_spin_lock(lock) __raw_spin_lock(&(lock)->raw_lock) argument
47 #define _raw_spin_lock_flags(lock, flags) __raw_spin_lock_flags(&(lock)->raw_lock, *(flags)) argument
48 #define _raw_spin_trylock(lock) __raw_spin_trylock(&(lock)->raw_lock) argument
49 #define _raw_spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock) argument
60 #define spin_trylock(lock) __cond_lock(_spin_trylock(lock)) argument
61 #define read_trylock(lock) __cond_lock(_read_trylock(lock)) argument
[all …]
Dspinlock_up.h19 #define __raw_spin_is_locked(lock) ((void)(lock), 0) argument
21 #define __raw_spin_lock(lock) do { (void)(lock); } while (0) argument
22 #define __raw_spin_unlock(lock) do { (void)(lock); } while (0) argument
23 #define __raw_spin_trylock(lock) ({ (void)(lock); 1; }) argument
25 #define __raw_read_can_lock(lock) (((void)(lock), 1)) argument
26 #define __raw_write_can_lock(lock) (((void)(lock), 1)) argument
28 #define __raw_spin_unlock_wait(lock) do { cpu_relax(); } while (__raw_spin_is_locked(lock)) argument
Dseqlock.h20 spinlock_t lock; member
34 #define write_seqlock_irqsave(lock, flags) do { local_irq_save(flags); write_seqlock(lock); } whi… argument
35 #define write_seqlock_irq(lock) do { local_irq_disable(); write_seqlock(lock); } while (0) argument
36 #define write_seqlock_bh(lock) do { local_bh_disable(); write_seqlock(lock); } while (0) argument
37 #define write_sequnlock_irqrestore(lock, flags) do { write_sequnlock(lock); local_irq_restore(fla… argument
38 #define write_sequnlock_irq(lock) do { write_sequnlock(lock); local_irq_enable(); } while(0) argument
39 #define write_sequnlock_bh(lock) do { write_sequnlock(lock); local_bh_enable(); } while(0) argument
40 #define read_seqbegin_irqsave(lock, flags) ({ local_irq_save(flags); read_seqbegin(lock); }) argument
41 #define read_seqretry_irqrestore(lock, iv, flags) ({ int ret = read_seqretry(lock, iv); local… argument
Dblockgroup_lock.h21 spinlock_t lock; member
28 …_bgl_lock(sb, block_group) (&(sb)->s_blockgroup_lock.locks[(block_group) & (NR_BG_LOCKS-1)].lock)
Dnotifier.h25 spinlock_t lock; member
38 #define ATOMIC_INIT_NOTIFIER_HEAD(name) do { spin_lock_init(&(name)->lock); (name)->head = NULL…
42 #define ATOMIC_NOTIFIER_INIT(name) { .lock = __SPIN_LOCK_UNLOCKED(name.lock), .head = NULL }
Dlockdep.h24 #define lockdep_init_map(lock, name, key) do { (void)(key); } while (0) argument
25 #define lockdep_set_class(lock, key) do { (void)(key); } while (0) argument
26 #define lockdep_set_class_and_name(lock, key, name) do { (void)(key); } while (0) argument
Dmutex.h44 #define mutex_lock_nested(lock, subclass) mutex_lock(lock) argument
Dmempool.h23 spinlock_t lock; member
Dirq.h90 spinlock_t lock; member
/bionic/libc/kernel/arch-sh/asm/
Dspinlock.h15 #define __raw_spin_is_locked(x) ((x)->lock <= 0)
16 #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) argument
17 #define __raw_spin_unlock_wait(x) do { cpu_relax(); } while ((x)->lock)
19 #define __raw_read_can_lock(x) ((x)->lock > 0)
20 #define __raw_write_can_lock(x) ((x)->lock == RW_LOCK_BIAS)
21 #define _raw_spin_relax(lock) cpu_relax() argument
22 #define _raw_read_relax(lock) cpu_relax() argument
23 #define _raw_write_relax(lock) cpu_relax() argument
Dspinlock_types.h20 volatile unsigned int lock; member
26 volatile unsigned int lock; member
/bionic/libc/stdio/
Dflockfile.c67 pthread_mutex_t lock; member
79 pthread_mutex_init(&_lockTable->lock, NULL); in lock_table_init()
88 pthread_mutex_lock( &_lockTable->lock ); in lock_table_lock()
95 pthread_mutex_unlock( &t->lock ); in lock_table_unlock()
122 FileLock* lock = *lookup; in flockfile() local
124 if (lock == NULL) { in flockfile()
128 lock = malloc(sizeof(*lock)); in flockfile()
129 if (lock == NULL) { in flockfile()
133 lock->next = NULL; in flockfile()
134 lock->file = fp; in flockfile()
[all …]
/bionic/libc/kernel/arch-arm/asm/
Dspinlock.h19 #define __raw_spin_is_locked(x) ((x)->lock != 0)
20 #define __raw_spin_unlock_wait(lock) do { while (__raw_spin_is_locked(lock)) cpu_relax(); } while… argument
22 #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) argument
25 #define __raw_write_can_lock(x) ((x)->lock == 0x80000000)
26 #define __raw_read_can_lock(x) ((x)->lock < 0x80000000)
Dspinlock_types.h20 volatile unsigned int lock; member
26 volatile unsigned int lock; member
/bionic/libc/kernel/arch-x86/asm/
Dspinlock_32.h26 #define _raw_spin_relax(lock) cpu_relax() argument
27 #define _raw_read_relax(lock) cpu_relax() argument
28 #define _raw_write_relax(lock) cpu_relax() argument
Dmmu.h21 struct mutex lock; member
Dspinlock_types.h26 unsigned int lock; member
/bionic/libc/bionic/
Dpthread-rwlocks.c133 ret = pthread_mutex_init(&rwlock->lock, lock_attr); in pthread_rwlock_init()
139 pthread_mutex_destroy(&rwlock->lock); in pthread_rwlock_init()
162 pthread_mutex_destroy(&rwlock->lock); in pthread_rwlock_destroy()
222 pthread_mutex_lock(&rwlock->lock); in pthread_rwlock_tryrdlock()
227 pthread_mutex_unlock(&rwlock->lock); in pthread_rwlock_tryrdlock()
239 pthread_mutex_lock(&rwlock->lock); in pthread_rwlock_timedrdlock()
244 ret = pthread_cond_timedwait(&rwlock->cond, &rwlock->lock, abs_timeout); in pthread_rwlock_timedrdlock()
252 pthread_mutex_unlock(&rwlock->lock); in pthread_rwlock_timedrdlock()
269 pthread_mutex_lock(&rwlock->lock); in pthread_rwlock_trywrlock()
277 pthread_mutex_unlock(&rwlock->lock); in pthread_rwlock_trywrlock()
[all …]
Dpthread-timers.c117 pthread_mutex_t lock; member
131 pthread_mutex_init( &t->lock, NULL ); in thr_timer_table_init()
150 pthread_mutex_lock(&t->lock); in thr_timer_table_alloc()
157 pthread_mutex_unlock(&t->lock); in thr_timer_table_alloc()
165 pthread_mutex_lock( &t->lock ); in thr_timer_table_free()
170 pthread_mutex_unlock( &t->lock ); in thr_timer_table_free()
179 pthread_mutex_lock(&t->lock); in thr_timer_table_start_stop()
192 pthread_mutex_unlock(&t->lock); in thr_timer_table_start_stop()
214 pthread_mutex_lock(&t->lock); in thr_timer_table_from_id()
227 pthread_mutex_unlock(&t->lock); in thr_timer_table_from_id()
/bionic/libc/arch-sh/bionic/
Datomics_sh.c46 pthread_mutex_t *lock = SWAP_LOCK(ptr);
48 pthread_mutex_lock(lock);
56 pthread_mutex_unlock(lock);
/bionic/libc/kernel/common/linux/lockd/
Dxdr.h45 struct nlm_lock lock; member
59 struct nlm_lock lock; member
/bionic/libc/kernel/common/linux/raid/
Dmd_k.h180lock, cmd) do { wait_queue_t __wait; init_waitqueue_entry(&__wait, current); add_wait_que… argument
182 …it_event_lock_irq(wq, condition, lock, cmd) do { if (condition) break; __wait_event_lock_ir… argument
/bionic/libc/kernel/common/linux/mtd/
Dflashchip.h63 spinlock_t lock; member
Dblktrans.h27 struct mutex lock; member

12