Home
last modified time | relevance | path

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

12345678910>>...35

/external/kernel-headers/original/linux/
Dspinlock.h80 extern int __lockfunc generic__raw_read_trylock(raw_rwlock_t *lock);
92 extern void __spin_lock_init(spinlock_t *lock, const char *name,
94 # define spin_lock_init(lock) \ argument
98 __spin_lock_init((lock), #lock, &__key); \
102 # define spin_lock_init(lock) \ argument
103 do { *(lock) = SPIN_LOCK_UNLOCKED; } while (0)
107 extern void __rwlock_init(rwlock_t *lock, const char *name,
109 # define rwlock_init(lock) \ argument
113 __rwlock_init((lock), #lock, &__key); \
116 # define rwlock_init(lock) \ argument
[all …]
Dspinlock_api_up.h19 #define assert_spin_locked(lock) do { (void)(lock); } while (0) argument
27 #define __LOCK(lock) \ argument
28 do { preempt_disable(); __acquire(lock); (void)(lock); } while (0)
30 #define __LOCK_BH(lock) \ argument
31 do { local_bh_disable(); __LOCK(lock); } while (0)
33 #define __LOCK_IRQ(lock) \ argument
34 do { local_irq_disable(); __LOCK(lock); } while (0)
36 #define __LOCK_IRQSAVE(lock, flags) \ argument
37 do { local_irq_save(flags); __LOCK(lock); } while (0)
39 #define __UNLOCK(lock) \ argument
[all …]
Dspinlock_up.h23 static inline void __raw_spin_lock(raw_spinlock_t *lock) in __raw_spin_lock() argument
25 lock->slock = 0; in __raw_spin_lock()
29 __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags) in __raw_spin_lock_flags() argument
32 lock->slock = 0; in __raw_spin_lock_flags()
35 static inline int __raw_spin_trylock(raw_spinlock_t *lock) in __raw_spin_trylock() argument
37 char oldval = lock->slock; in __raw_spin_trylock()
39 lock->slock = 0; in __raw_spin_trylock()
44 static inline void __raw_spin_unlock(raw_spinlock_t *lock) in __raw_spin_unlock() argument
46 lock->slock = 1; in __raw_spin_unlock()
52 #define __raw_read_lock(lock) do { (void)(lock); } while (0) argument
[all …]
Dspinlock_api_smp.h22 void __lockfunc _spin_lock(spinlock_t *lock) __acquires(spinlock_t);
23 void __lockfunc _spin_lock_nested(spinlock_t *lock, int subclass)
25 void __lockfunc _read_lock(rwlock_t *lock) __acquires(rwlock_t);
26 void __lockfunc _write_lock(rwlock_t *lock) __acquires(rwlock_t);
27 void __lockfunc _spin_lock_bh(spinlock_t *lock) __acquires(spinlock_t);
28 void __lockfunc _read_lock_bh(rwlock_t *lock) __acquires(rwlock_t);
29 void __lockfunc _write_lock_bh(rwlock_t *lock) __acquires(rwlock_t);
30 void __lockfunc _spin_lock_irq(spinlock_t *lock) __acquires(spinlock_t);
31 void __lockfunc _read_lock_irq(rwlock_t *lock) __acquires(rwlock_t);
32 void __lockfunc _write_lock_irq(rwlock_t *lock) __acquires(rwlock_t);
[all …]
Dseqlock.h34 spinlock_t lock; member
59 spin_lock(&sl->lock); in write_seqlock()
68 spin_unlock(&sl->lock); in write_sequnlock()
73 int ret = spin_trylock(&sl->lock); in write_tryseqlock()
158 #define write_seqlock_irqsave(lock, flags) \ argument
159 do { local_irq_save(flags); write_seqlock(lock); } while (0)
160 #define write_seqlock_irq(lock) \ argument
161 do { local_irq_disable(); write_seqlock(lock); } while (0)
162 #define write_seqlock_bh(lock) \ argument
163 do { local_bh_disable(); write_seqlock(lock); } while (0)
[all …]
Dmutex.h70 struct mutex *lock; member
105 extern void __mutex_init(struct mutex *lock, const char *name,
114 static inline int fastcall mutex_is_locked(struct mutex *lock) in mutex_is_locked() argument
116 return atomic_read(&lock->count) != 1; in mutex_is_locked()
123 extern void fastcall mutex_lock(struct mutex *lock);
124 extern int fastcall mutex_lock_interruptible(struct mutex *lock);
127 extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass);
129 # define mutex_lock_nested(lock, subclass) mutex_lock(lock) argument
136 extern int fastcall mutex_trylock(struct mutex *lock);
137 extern void fastcall mutex_unlock(struct mutex *lock);
/external/qemu/android/utils/
Dfilelock.c76 const char* lock; member
95 filelock_lock( FileLock* lock ) in filelock_lock() argument
101 ret = _mkdir( lock->lock ); in filelock_lock()
104 D( "could not access directory '%s', check path elements", lock->lock ); in filelock_lock()
107 D( "_mkdir(%s): %s", lock->lock, strerror(errno) ); in filelock_lock()
113 … already exist, waiting a bit to ensure that no other emulator instance is starting", lock->lock ); in filelock_lock()
120 pidfile_fd = open( lock->temp, O_RDONLY ); in filelock_lock()
131 D( "no pid file in '%s', assuming stale directory", lock->lock ); in filelock_lock()
144 D( "could not read pid file '%s'", lock->temp ); in filelock_lock()
183 D( "the file '%s' is locked by process ID %d\n", lock->file, lockpid ); in filelock_lock()
[all …]
/external/valgrind/main/helgrind/
Dhg_lock_n_thread.c65 static Bool is_sane_Lock_BASE ( Lock* lock ) in is_sane_Lock_BASE() argument
67 if (lock == NULL in is_sane_Lock_BASE()
68 || (lock->magic != LockN_MAGIC && lock->magic != LockP_MAGIC)) in is_sane_Lock_BASE()
70 switch (lock->kind) { in is_sane_Lock_BASE()
74 if (lock->heldBy == NULL) { in is_sane_Lock_BASE()
75 if (lock->acquired_at != NULL) return False; in is_sane_Lock_BASE()
77 return !lock->heldW; in is_sane_Lock_BASE()
79 if (lock->acquired_at == NULL) return False; in is_sane_Lock_BASE()
84 if (VG_(isEmptyBag)(lock->heldBy)) in is_sane_Lock_BASE()
88 if (!is_sane_Bag_of_Threads(lock->heldBy)) in is_sane_Lock_BASE()
[all …]
/external/guava/guava/src/com/google/common/util/concurrent/
DMonitor.java229 this.condition = monitor.lock.newCondition(); in Guard()
261 private final ReentrantLock lock; field in Monitor
287 this.lock = new ReentrantLock(fair); in Monitor()
294 lock.lock(); in enter()
301 lock.lockInterruptibly(); in enterInterruptibly()
310 final ReentrantLock lock = this.lock; in enter() local
311 if (!fair && lock.tryLock()) { in enter()
321 return lock.tryLock(remainingNanos, TimeUnit.NANOSECONDS); in enter()
340 return lock.tryLock(time, unit); in enterInterruptibly()
351 return lock.tryLock(); in tryEnter()
[all …]
DAbstractService.java42 private final ReentrantLock lock = new ReentrantLock(); field in AbstractService
86 lock.lock(); in start()
96 lock.unlock(); in start()
104 lock.lock(); in stop()
121 lock.unlock(); in stop()
146 lock.lock(); in notifyStarted()
162 lock.unlock(); in notifyStarted()
175 lock.lock(); in notifyStopped()
187 lock.unlock(); in notifyStopped()
200 lock.lock(); in notifyFailed()
[all …]
DMoreExecutors.java234 private final Lock lock = new ReentrantLock(); field in MoreExecutors.SameThreadExecutorService
237 private final Condition termination = lock.newCondition();
261 lock.lock(); in isShutdown()
265 lock.unlock(); in isShutdown()
271 lock.lock(); in shutdown()
275 lock.unlock(); in shutdown()
288 lock.lock(); in isTerminated()
292 lock.unlock(); in isTerminated()
300 lock.lock(); in awaitTermination()
312 lock.unlock(); in awaitTermination()
[all …]
DAbstractScheduledService.java163 private final ReentrantLock lock = new ReentrantLock();
167 lock.lock();
180 lock.unlock();
189 lock.lock();
198 lock.unlock();
209 lock.lock();
220 lock.unlock();
327 private final ReentrantLock lock = new ReentrantLock();
355 lock.lock();
369 lock.unlock();
[all …]
/external/chromium/base/synchronization/
Dlock_unittest.cc17 BasicLockTestThread(Lock* lock) : lock_(lock), acquired_(0) {} in BasicLockTestThread() argument
50 Lock lock; in TEST() local
51 BasicLockTestThread thread(&lock); in TEST()
58 lock.Acquire(); in TEST()
60 lock.Release(); in TEST()
63 lock.Acquire(); in TEST()
66 lock.Release(); in TEST()
69 if (lock.Try()) { in TEST()
72 lock.Release(); in TEST()
76 lock.Acquire(); in TEST()
[all …]
/external/kernel-headers/original/asm-x86/
Dspinlock_32.h35 static inline void __raw_spin_lock(raw_spinlock_t *lock) in __raw_spin_lock() argument
46 : "+m" (lock->slock) : : "memory"); in __raw_spin_lock()
58 static inline void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags) in __raw_spin_lock_flags() argument
80 : [slock] "+m" (lock->slock) in __raw_spin_lock_flags()
87 static inline int __raw_spin_trylock(raw_spinlock_t *lock) in __raw_spin_trylock() argument
92 :"=q" (oldval), "+m" (lock->slock) in __raw_spin_trylock()
106 static inline void __raw_spin_unlock(raw_spinlock_t *lock) in __raw_spin_unlock() argument
108 asm volatile("movb $1,%0" : "+m" (lock->slock) :: "memory"); in __raw_spin_unlock()
113 static inline void __raw_spin_unlock(raw_spinlock_t *lock) in __raw_spin_unlock() argument
118 : "=q" (oldval), "+m" (lock->slock) in __raw_spin_unlock()
[all …]
/external/kernel-headers/original/asm-arm/
Dspinlock.h20 #define __raw_spin_is_locked(x) ((x)->lock != 0)
21 #define __raw_spin_unlock_wait(lock) \ argument
22 do { while (__raw_spin_is_locked(lock)) cpu_relax(); } while (0)
24 #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) argument
26 static inline void __raw_spin_lock(raw_spinlock_t *lock) in __raw_spin_lock() argument
40 : "r" (&lock->lock), "r" (1) in __raw_spin_lock()
46 static inline int __raw_spin_trylock(raw_spinlock_t *lock) in __raw_spin_trylock() argument
55 : "r" (&lock->lock), "r" (1) in __raw_spin_trylock()
66 static inline void __raw_spin_unlock(raw_spinlock_t *lock) in __raw_spin_unlock() argument
77 : "r" (&lock->lock), "r" (0) in __raw_spin_unlock()
[all …]
/external/elfutils/lib/
Deu-config.h61 # define rwlock_init(lock) RWLOCK_CALL (init (&lock, NULL)) argument
62 # define rwlock_fini(lock) RWLOCK_CALL (destroy (&lock)) argument
63 # define rwlock_rdlock(lock) RWLOCK_CALL (rdlock (&lock)) argument
64 # define rwlock_wrlock(lock) RWLOCK_CALL (wrlock (&lock)) argument
65 # define rwlock_unlock(lock) RWLOCK_CALL (unlock (&lock)) argument
70 # define lock_lock(lock) ((void) (lock)) argument
72 # define rwlock_init(lock) ((void) (lock)) argument
73 # define rwlock_fini(lock) ((void) (lock)) argument
74 # define rwlock_rdlock(lock) ((void) (lock)) argument
75 # define rwlock_wrlock(lock) ((void) (lock)) argument
[all …]
/external/chromium/chrome/browser/importer/
Dfirefox_profile_lock_unittest.cc44 scoped_ptr<FirefoxProfileLock> lock; in TEST_F() local
45 EXPECT_EQ(static_cast<FirefoxProfileLock*>(NULL), lock.get()); in TEST_F()
47 lock.reset(new FirefoxProfileLock(test_path)); in TEST_F()
48 EXPECT_TRUE(lock->HasAcquired()); in TEST_F()
50 lock->Unlock(); in TEST_F()
51 EXPECT_FALSE(lock->HasAcquired()); in TEST_F()
57 lock->Lock(); in TEST_F()
58 EXPECT_TRUE(lock->HasAcquired()); in TEST_F()
60 lock->Lock(); in TEST_F()
61 EXPECT_TRUE(lock->HasAcquired()); in TEST_F()
[all …]
/external/qemu/distrib/sdl-1.2.15/src/thread/dc/
DSDL_syscond.c34 SDL_mutex *lock; member
48 cond->lock = SDL_CreateMutex(); in SDL_CreateCond()
52 if ( ! cond->lock || ! cond->wait_sem || ! cond->wait_done ) { in SDL_CreateCond()
72 if ( cond->lock ) { in SDL_DestroyCond()
73 SDL_DestroyMutex(cond->lock); in SDL_DestroyCond()
90 SDL_LockMutex(cond->lock); in SDL_CondSignal()
94 SDL_UnlockMutex(cond->lock); in SDL_CondSignal()
97 SDL_UnlockMutex(cond->lock); in SDL_CondSignal()
114 SDL_LockMutex(cond->lock); in SDL_CondBroadcast()
126 SDL_UnlockMutex(cond->lock); in SDL_CondBroadcast()
[all …]
/external/qemu/distrib/sdl-1.2.15/src/thread/generic/
DSDL_syscond.c34 SDL_mutex *lock; member
48 cond->lock = SDL_CreateMutex(); in SDL_CreateCond()
52 if ( ! cond->lock || ! cond->wait_sem || ! cond->wait_done ) { in SDL_CreateCond()
72 if ( cond->lock ) { in SDL_DestroyCond()
73 SDL_DestroyMutex(cond->lock); in SDL_DestroyCond()
90 SDL_LockMutex(cond->lock); in SDL_CondSignal()
94 SDL_UnlockMutex(cond->lock); in SDL_CondSignal()
97 SDL_UnlockMutex(cond->lock); in SDL_CondSignal()
114 SDL_LockMutex(cond->lock); in SDL_CondBroadcast()
126 SDL_UnlockMutex(cond->lock); in SDL_CondBroadcast()
[all …]
/external/linux-tools-perf/Documentation/
Dperf-lock.txt1 perf-lock(1)
6 perf-lock - Analyze lock events
11 'perf lock' {record|report|trace}
15 You can analyze various lock behaviours
16 and statistics with this 'perf lock' command.
18 'perf lock record <command>' records lock events
21 results of lock events.
23 'perf lock trace' shows raw lock events.
25 'perf lock report' reports statistical data.
/external/qemu/distrib/sdl-1.2.15/src/thread/os2/
DSDL_syscond.c34 SDL_mutex *lock; member
48 cond->lock = SDL_CreateMutex(); in SDL_CreateCond()
52 if ( ! cond->lock || ! cond->wait_sem || ! cond->wait_done ) { in SDL_CreateCond()
72 if ( cond->lock ) { in SDL_DestroyCond()
73 SDL_DestroyMutex(cond->lock); in SDL_DestroyCond()
90 SDL_LockMutex(cond->lock); in SDL_CondSignal()
94 SDL_UnlockMutex(cond->lock); in SDL_CondSignal()
97 SDL_UnlockMutex(cond->lock); in SDL_CondSignal()
114 SDL_LockMutex(cond->lock); in SDL_CondBroadcast()
126 SDL_UnlockMutex(cond->lock); in SDL_CondBroadcast()
[all …]
/external/libmtp/
Dlibmtp.sh.in25 if [ -f /var/run/console/console.lock ]
27 DEVICEOWNER=`cat /var/run/console/console.lock`
28 elif [ -f /var/run/console.lock ]
30 DEVICEOWNER=`cat /var/run/console.lock`
31 elif [ -f /var/lock/console.lock ]
33 DEVICEOWNER=`cat /var/lock/console.lock`
Dlibmtp.sh25 if [ -f /var/run/console/console.lock ]
27 DEVICEOWNER=`cat /var/run/console/console.lock`
28 elif [ -f /var/run/console.lock ]
30 DEVICEOWNER=`cat /var/run/console.lock`
31 elif [ -f /var/lock/console.lock ]
33 DEVICEOWNER=`cat /var/lock/console.lock`
/external/llvm/test/CodeGen/X86/
Datomic_op.ll26 ; CHECK: lock
30 ; CHECK: lock
34 ; CHECK: lock
38 ; CHECK: lock
43 ; CHECK: lock
48 ; CHECK: lock
53 ; CHECK: lock
58 ; CHECK: lock
64 ; CHECK: lock
69 ; CHECK: lock
[all …]
/external/apache-harmony/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/
DFileChannelLockingTest.java89 readOnlyChannel.lock(); in test_illegalLocks()
97 writeOnlyChannel.lock(1, 10, true); in test_illegalLocks()
106 FileLock flock = readWriteChannel.lock(); in test_lockReadWrite()
115 readOnlyChannel.lock(-1, 10, true); in test_illegalLockParameters()
121 writeOnlyChannel.lock(-1, 10, false); in test_illegalLockParameters()
127 readWriteChannel.lock(-1, 10, false); in test_illegalLockParameters()
134 FileLock flock1 = readWriteChannel.lock(22, 110, true); in test_illegalLockParameters()
138 readWriteChannel.lock(75, 210, true); in test_illegalLockParameters()
147 FileLock flock1 = readWriteChannel.lock(0, 10, false); in test_lockLLZ()
150 FileLock flock2 = readWriteChannel.lock(22, 100, true); in test_lockLLZ()
[all …]

12345678910>>...35