Home
last modified time | relevance | path

Searched refs:mutex (Results 1 – 25 of 2136) sorted by relevance

12345678910>>...86

/external/guava/android/guava/src/com/google/common/collect/
DSynchronized.java63 final Object mutex; field in Synchronized.SynchronizedObject
65 SynchronizedObject(Object delegate, @NullableDecl Object mutex) { in SynchronizedObject() argument
67 this.mutex = (mutex == null) ? this : mutex; in SynchronizedObject()
78 synchronized (mutex) { in toString()
90 synchronized (mutex) { in writeObject()
100 Collection<E> collection, @NullableDecl Object mutex) { in collection() argument
101 return new SynchronizedCollection<E>(collection, mutex); in collection()
106 private SynchronizedCollection(Collection<E> delegate, @NullableDecl Object mutex) { in SynchronizedCollection() argument
107 super(delegate, mutex); in SynchronizedCollection()
118 synchronized (mutex) { in add()
[all …]
/external/kotlinx.coroutines/kotlinx-coroutines-core/common/test/sync/
DMutexTest.kt13 val mutex = Mutex() in <lambda>() constant
17 mutex.lock() // suspends in <lambda>()
19 mutex.unlock() in <lambda>()
23 mutex.lock() // locked in <lambda>()
27 mutex.unlock() in <lambda>()
35 val mutex = Mutex() in tryLockTest() constant
36 assertFalse(mutex.isLocked) in tryLockTest()
37 assertTrue(mutex.tryLock()) in tryLockTest()
38 assertTrue(mutex.isLocked) in tryLockTest()
39 assertFalse(mutex.tryLock()) in tryLockTest()
[all …]
/external/guava/guava/src/com/google/common/collect/
DSynchronized.java71 final Object mutex; field in Synchronized.SynchronizedObject
73 SynchronizedObject(Object delegate, @Nullable Object mutex) { in SynchronizedObject() argument
75 this.mutex = (mutex == null) ? this : mutex; in SynchronizedObject()
86 synchronized (mutex) { in toString()
98 synchronized (mutex) { in writeObject()
107 private static <E> Collection<E> collection(Collection<E> collection, @Nullable Object mutex) { in collection() argument
108 return new SynchronizedCollection<E>(collection, mutex); in collection()
113 private SynchronizedCollection(Collection<E> delegate, @Nullable Object mutex) { in SynchronizedCollection() argument
114 super(delegate, mutex); in SynchronizedCollection()
125 synchronized (mutex) { in add()
[all …]
/external/pigweed/pw_sync/
Dtimed_mutex_facade_test.cc30 void pw_sync_TimedMutex_CallLock(pw_sync_TimedMutex* mutex);
31 bool pw_sync_TimedMutex_CallTryLock(pw_sync_TimedMutex* mutex);
33 pw_sync_TimedMutex* mutex, pw_chrono_SystemClock_Duration for_at_least);
35 pw_sync_TimedMutex* mutex, pw_chrono_SystemClock_TimePoint until_at_least);
36 void pw_sync_TimedMutex_CallUnlock(pw_sync_TimedMutex* mutex);
51 pw::sync::TimedMutex mutex; in TEST() local
52 mutex.lock(); in TEST()
55 mutex.unlock(); in TEST()
67 pw::sync::TimedMutex mutex; in TEST() local
68 const bool locked = mutex.try_lock(); in TEST()
[all …]
Dmutex_facade_test.cc26 void pw_sync_Mutex_CallLock(pw_sync_Mutex* mutex);
27 bool pw_sync_Mutex_CallTryLock(pw_sync_Mutex* mutex);
28 void pw_sync_Mutex_CallUnlock(pw_sync_Mutex* mutex);
35 pw::sync::Mutex mutex; in TEST() local
36 mutex.lock(); in TEST()
39 mutex.unlock(); in TEST()
51 pw::sync::Mutex mutex; in TEST() local
52 const bool locked = mutex.try_lock(); in TEST()
57 mutex.unlock(); in TEST()
62 pw::sync::Mutex mutex; in TEST() local
[all …]
/external/jemalloc_new/src/
Dmutex.c42 JEMALLOC_EXPORT int _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex,
47 malloc_mutex_lock_slow(malloc_mutex_t *mutex) { in malloc_mutex_lock_slow() argument
48 mutex_prof_data_t *data = &mutex->prof_data; in malloc_mutex_lock_slow()
58 if (!malloc_mutex_trylock_final(mutex)) { in malloc_mutex_lock_slow()
66 malloc_mutex_lock_final(mutex); in malloc_mutex_lock_slow()
77 if (!malloc_mutex_trylock_final(mutex)) { in malloc_mutex_lock_slow()
84 malloc_mutex_lock_final(mutex); in malloc_mutex_lock_slow()
112 malloc_mutex_prof_data_reset(tsdn_t *tsdn, malloc_mutex_t *mutex) { in malloc_mutex_prof_data_reset() argument
113 malloc_mutex_assert_owner(tsdn, mutex); in malloc_mutex_prof_data_reset()
114 mutex_prof_data_init(&mutex->prof_data); in malloc_mutex_prof_data_reset()
[all …]
/external/swiftshader/src/Common/
DMutexLock.hpp32 pthread_mutex_init(&mutex, NULL); in MutexLock()
37 pthread_mutex_destroy(&mutex); in ~MutexLock()
42 return pthread_mutex_trylock(&mutex) == 0; in attemptLock()
47 pthread_mutex_lock(&mutex); in lock()
52 pthread_mutex_unlock(&mutex); in unlock()
56 pthread_mutex_t mutex; member in sw::MutexLock
71 mutex = 0; in BackoffLock()
78 if(mutex.exchange(true) == false) in attemptLock()
153 mutex.store(false, std::memory_order_release); in unlock()
158 return mutex.load(std::memory_order_acquire); in isLocked()
[all …]
DRecursiveLock.hpp33 return mutex.try_lock(); in attemptLock()
38 mutex.lock(); in lock()
43 mutex.unlock(); in unlock()
46 std::recursive_mutex mutex; member in sw::RecursiveLock
53 explicit RecursiveLockGuard(sw::RecursiveLock &mutex) : mutex(&mutex) in RecursiveLockGuard() argument
55 mutex.lock(); in RecursiveLockGuard()
58 explicit RecursiveLockGuard(sw::RecursiveLock *mutex) : mutex(mutex) in RecursiveLockGuard() argument
60 if (mutex) mutex->lock(); in RecursiveLockGuard()
65 if (mutex) mutex->unlock(); in ~RecursiveLockGuard()
69 sw::RecursiveLock *mutex; member in RecursiveLockGuard
/external/pdfium/third_party/libopenjpeg20/
Dthread.c71 opj_mutex_t* mutex = (opj_mutex_t*) opj_malloc(sizeof(opj_mutex_t)); in opj_mutex_create() local
72 if (!mutex) { in opj_mutex_create()
75 InitializeCriticalSectionAndSpinCount(&(mutex->cs), 4000); in opj_mutex_create()
76 return mutex; in opj_mutex_create()
79 void opj_mutex_lock(opj_mutex_t* mutex) in opj_mutex_lock() argument
81 EnterCriticalSection(&(mutex->cs)); in opj_mutex_lock()
84 void opj_mutex_unlock(opj_mutex_t* mutex) in opj_mutex_unlock() argument
86 LeaveCriticalSection(&(mutex->cs)); in opj_mutex_unlock()
89 void opj_mutex_destroy(opj_mutex_t* mutex) in opj_mutex_destroy() argument
91 if (!mutex) { in opj_mutex_destroy()
[all …]
/external/libcups/cups/
Dthread.c47 _cups_mutex_t *mutex, /* I - Mutex */ in _cupsCondWait() argument
65 pthread_cond_timedwait(cond, mutex, &abstime); in _cupsCondWait()
68 pthread_cond_wait(cond, mutex); in _cupsCondWait()
77 _cupsMutexInit(_cups_mutex_t *mutex) /* I - Mutex */ in _cupsMutexInit() argument
79 pthread_mutex_init(mutex, NULL); in _cupsMutexInit()
88 _cupsMutexLock(_cups_mutex_t *mutex) /* I - Mutex */ in _cupsMutexLock() argument
90 pthread_mutex_lock(mutex); in _cupsMutexLock()
99 _cupsMutexUnlock(_cups_mutex_t *mutex) /* I - Mutex */ in _cupsMutexUnlock() argument
101 pthread_mutex_unlock(mutex); in _cupsMutexUnlock()
238 _cups_mutex_t *mutex, /* I - Mutex */ in _cupsCondWait() argument
[all …]
/external/jemalloc_new/include/jemalloc/internal/
Dmutex.h129 bool malloc_mutex_init(malloc_mutex_t *mutex, const char *name,
131 void malloc_mutex_prefork(tsdn_t *tsdn, malloc_mutex_t *mutex);
132 void malloc_mutex_postfork_parent(tsdn_t *tsdn, malloc_mutex_t *mutex);
133 void malloc_mutex_postfork_child(tsdn_t *tsdn, malloc_mutex_t *mutex);
135 void malloc_mutex_prof_data_reset(tsdn_t *tsdn, malloc_mutex_t *mutex);
137 void malloc_mutex_lock_slow(malloc_mutex_t *mutex);
140 malloc_mutex_lock_final(malloc_mutex_t *mutex) { in malloc_mutex_lock_final() argument
141 MALLOC_MUTEX_LOCK(mutex); in malloc_mutex_lock_final()
145 malloc_mutex_trylock_final(malloc_mutex_t *mutex) { in malloc_mutex_trylock_final() argument
146 return MALLOC_MUTEX_TRYLOCK(mutex); in malloc_mutex_trylock_final()
[all …]
/external/guava/android/guava-tests/test/com/google/common/collect/
DSynchronizedNavigableMapTest.java48 TestMap<K, V> inner = new TestMap<>(innermost, mutex); in create()
49 NavigableMap<K, V> outer = Synchronized.navigableMap(inner, mutex); in create()
55 private final Object mutex; field in SynchronizedNavigableMapTest.TestEntry
57 TestEntry(Entry<K, V> delegate, Object mutex) { in TestEntry() argument
59 this.mutex = mutex; in TestEntry()
69 assertTrue(Thread.holdsLock(mutex)); in equals()
75 assertTrue(Thread.holdsLock(mutex)); in getKey()
81 assertTrue(Thread.holdsLock(mutex)); in getValue()
87 assertTrue(Thread.holdsLock(mutex)); in hashCode()
93 assertTrue(Thread.holdsLock(mutex)); in setValue()
[all …]
DSynchronizedDequeTest.java34 Deque<String> outer = Synchronized.deque(inner, inner.mutex); in create()
41 public final Object mutex = new Integer(1); // something Serializable field in SynchronizedDequeTest.TestDeque
45 assertTrue(Thread.holdsLock(mutex)); in offer()
51 assertTrue(Thread.holdsLock(mutex)); in poll()
57 assertTrue(Thread.holdsLock(mutex)); in remove()
63 assertTrue(Thread.holdsLock(mutex)); in remove()
69 assertTrue(Thread.holdsLock(mutex)); in peek()
75 assertTrue(Thread.holdsLock(mutex)); in element()
82 assertFalse(Thread.holdsLock(mutex)); in iterator()
88 assertTrue(Thread.holdsLock(mutex)); in size()
[all …]
DSynchronizedMapTest.java38 public final Object mutex = new Integer(1); // something Serializable field in SynchronizedMapTest
41 TestMap<K, V> inner = new TestMap<>(new HashMap<K, V>(), mutex); in create()
42 Map<K, V> outer = Synchronized.map(inner, mutex); in create()
47 public final Object mutex; field in SynchronizedMapTest.TestMap
50 public TestMap(Map<K, V> delegate, Object mutex) { in TestMap() argument
51 checkNotNull(mutex); in TestMap()
53 this.mutex = mutex; in TestMap()
63 assertTrue(Thread.holdsLock(mutex)); in size()
69 assertTrue(Thread.holdsLock(mutex)); in isEmpty()
75 assertTrue(Thread.holdsLock(mutex)); in remove()
[all …]
/external/guava/guava-tests/test/com/google/common/collect/
DSynchronizedNavigableMapTest.java48 TestMap<K, V> inner = new TestMap<>(innermost, mutex); in create()
49 NavigableMap<K, V> outer = Synchronized.navigableMap(inner, mutex); in create()
55 private final Object mutex; field in SynchronizedNavigableMapTest.TestEntry
57 TestEntry(Entry<K, V> delegate, Object mutex) { in TestEntry() argument
59 this.mutex = mutex; in TestEntry()
69 assertTrue(Thread.holdsLock(mutex)); in equals()
75 assertTrue(Thread.holdsLock(mutex)); in getKey()
81 assertTrue(Thread.holdsLock(mutex)); in getValue()
87 assertTrue(Thread.holdsLock(mutex)); in hashCode()
93 assertTrue(Thread.holdsLock(mutex)); in setValue()
[all …]
DSynchronizedDequeTest.java34 Deque<String> outer = Synchronized.deque(inner, inner.mutex); in create()
41 public final Object mutex = new Integer(1); // something Serializable field in SynchronizedDequeTest.TestDeque
45 assertTrue(Thread.holdsLock(mutex)); in offer()
51 assertTrue(Thread.holdsLock(mutex)); in poll()
57 assertTrue(Thread.holdsLock(mutex)); in remove()
63 assertTrue(Thread.holdsLock(mutex)); in remove()
69 assertTrue(Thread.holdsLock(mutex)); in peek()
75 assertTrue(Thread.holdsLock(mutex)); in element()
82 assertFalse(Thread.holdsLock(mutex)); in iterator()
88 assertTrue(Thread.holdsLock(mutex)); in size()
[all …]
DSynchronizedMapTest.java38 public final Object mutex = new Integer(1); // something Serializable field in SynchronizedMapTest
41 TestMap<K, V> inner = new TestMap<>(new HashMap<K, V>(), mutex); in create()
42 Map<K, V> outer = Synchronized.map(inner, mutex); in create()
47 public final Object mutex; field in SynchronizedMapTest.TestMap
50 public TestMap(Map<K, V> delegate, Object mutex) { in TestMap() argument
51 checkNotNull(mutex); in TestMap()
53 this.mutex = mutex; in TestMap()
63 assertTrue(Thread.holdsLock(mutex)); in size()
69 assertTrue(Thread.holdsLock(mutex)); in isEmpty()
75 assertTrue(Thread.holdsLock(mutex)); in remove()
[all …]
/external/virglrenderer/src/gallium/auxiliary/os/
Dos_thread.h93 #define pipe_static_mutex(mutex) \ argument
94 static pipe_mutex mutex = _MTX_INITIALIZER_NP
96 #define pipe_mutex_init(mutex) \ argument
97 (void) mtx_init(&(mutex), mtx_plain)
99 #define pipe_mutex_destroy(mutex) \ argument
100 mtx_destroy(&(mutex))
102 #define pipe_mutex_lock(mutex) \ argument
103 (void) mtx_lock(&(mutex))
105 #define pipe_mutex_unlock(mutex) \ argument
106 (void) mtx_unlock(&(mutex))
[all …]
/external/python/cpython2/Python/
Dthread_nt.h20 InitializeNonRecursiveMutex(PNRMUTEX mutex) in InitializeNonRecursiveMutex() argument
22 mutex->owned = -1 ; /* No threads have entered NonRecursiveMutex */ in InitializeNonRecursiveMutex()
23 mutex->thread_id = 0 ; in InitializeNonRecursiveMutex()
24 mutex->hevent = CreateEvent(NULL, FALSE, FALSE, NULL) ; in InitializeNonRecursiveMutex()
25 return mutex->hevent != NULL ; /* TRUE if the mutex is created */ in InitializeNonRecursiveMutex()
29 DeleteNonRecursiveMutex(PNRMUTEX mutex) in DeleteNonRecursiveMutex() argument
32 CloseHandle(mutex->hevent) ; in DeleteNonRecursiveMutex()
33 mutex->hevent = NULL ; /* Just in case */ in DeleteNonRecursiveMutex()
37 EnterNonRecursiveMutex(PNRMUTEX mutex, BOOL wait) in EnterNonRecursiveMutex() argument
45 if (InterlockedCompareExchange(&mutex->owned, 0, -1) != -1) in EnterNonRecursiveMutex()
[all …]
/external/libusb/libusb/os/
Dthreads_posix.h30 static inline void usbi_mutex_static_lock(usbi_mutex_static_t *mutex) in usbi_mutex_static_lock() argument
32 PTHREAD_CHECK(pthread_mutex_lock(mutex)); in usbi_mutex_static_lock()
34 static inline void usbi_mutex_static_unlock(usbi_mutex_static_t *mutex) in usbi_mutex_static_unlock() argument
36 PTHREAD_CHECK(pthread_mutex_unlock(mutex)); in usbi_mutex_static_unlock()
40 static inline void usbi_mutex_init(usbi_mutex_t *mutex) in usbi_mutex_init() argument
42 PTHREAD_CHECK(pthread_mutex_init(mutex, NULL)); in usbi_mutex_init()
44 static inline void usbi_mutex_lock(usbi_mutex_t *mutex) in usbi_mutex_lock() argument
46 PTHREAD_CHECK(pthread_mutex_lock(mutex)); in usbi_mutex_lock()
48 static inline void usbi_mutex_unlock(usbi_mutex_t *mutex) in usbi_mutex_unlock() argument
50 PTHREAD_CHECK(pthread_mutex_unlock(mutex)); in usbi_mutex_unlock()
[all …]
Dthreads_windows.h28 static inline void usbi_mutex_static_lock(usbi_mutex_static_t *mutex) in usbi_mutex_static_lock() argument
30 while (InterlockedExchange(mutex, 1L) == 1L) in usbi_mutex_static_lock()
33 static inline void usbi_mutex_static_unlock(usbi_mutex_static_t *mutex) in usbi_mutex_static_unlock() argument
35 InterlockedExchange(mutex, 0L); in usbi_mutex_static_unlock()
39 static inline void usbi_mutex_init(usbi_mutex_t *mutex) in usbi_mutex_init() argument
41 InitializeCriticalSection(mutex); in usbi_mutex_init()
43 static inline void usbi_mutex_lock(usbi_mutex_t *mutex) in usbi_mutex_lock() argument
45 EnterCriticalSection(mutex); in usbi_mutex_lock()
47 static inline void usbi_mutex_unlock(usbi_mutex_t *mutex) in usbi_mutex_unlock() argument
49 LeaveCriticalSection(mutex); in usbi_mutex_unlock()
[all …]
/external/deqp/framework/delibs/dethread/unix/
DdeMutexUnix.c40 pthread_mutex_t* mutex = deMalloc(sizeof(pthread_mutex_t)); in deMutex_create() local
42 if (!mutex) in deMutex_create()
47 deFree(mutex); in deMutex_create()
58 deFree(mutex); in deMutex_create()
69 deFree(mutex); in deMutex_create()
75 ret = pthread_mutex_init(mutex, &attr); in deMutex_create()
79 deFree(mutex); in deMutex_create()
85 return (deMutex)mutex; in deMutex_create()
88 void deMutex_destroy (deMutex mutex) in deMutex_destroy() argument
90 pthread_mutex_t* pMutex = (pthread_mutex_t*)mutex; in deMutex_destroy()
[all …]
/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/sync/
DMutexStressTest.kt17 val mutex = Mutex() in <lambda>() constant
21 mutex.lock() in <lambda>()
23 mutex.unlock() in <lambda>()
34 val mutex = Mutex(true) // create a locked mutex in <lambda>() constant
39 assertTrue(mutex.isLocked) in <lambda>()
42 mutex.lock() in <lambda>()
44 mutex.unlock() in <lambda>()
49 mutex.unlock() in <lambda>()
55 assertFalse(mutex.isLocked) in <lambda>()
56 mutex.lock() in <lambda>()
[all …]
/external/deqp/framework/delibs/dethread/win32/
DdeMutexWin32.c65 void deMutex_destroy (deMutex mutex) in deMutex_destroy() argument
67 DeleteCriticalSection((CRITICAL_SECTION*)mutex); in deMutex_destroy()
68 deFree((CRITICAL_SECTION*)mutex); in deMutex_destroy()
71 void deMutex_lock (deMutex mutex) in deMutex_lock() argument
73 EnterCriticalSection((CRITICAL_SECTION*)mutex); in deMutex_lock()
76 void deMutex_unlock (deMutex mutex) in deMutex_unlock() argument
78 LeaveCriticalSection((CRITICAL_SECTION*)mutex); in deMutex_unlock()
81 deBool deMutex_tryLock (deMutex mutex) in deMutex_tryLock() argument
83 return TryEnterCriticalSection((CRITICAL_SECTION*)mutex) == TRUE; in deMutex_tryLock()
101 void deMutex_destroy (deMutex mutex) in deMutex_destroy() argument
[all …]
/external/perfetto/src/tracing/
Dtracing.cc86 std::mutex mutex; in ReadTraceBlocking() local
91 ReadTrace([&mutex, &raw_trace, &all_read, &cv](ReadTraceCallbackArgs cb) { in ReadTraceBlocking()
93 std::unique_lock<std::mutex> lock(mutex); in ReadTraceBlocking()
100 std::unique_lock<std::mutex> lock(mutex); in ReadTraceBlocking()
108 std::mutex mutex; in GetTraceStatsBlocking() local
114 [&mutex, &result, &stats_read, &cv](GetTraceStatsCallbackArgs args) { in GetTraceStatsBlocking()
116 std::unique_lock<std::mutex> lock(mutex); in GetTraceStatsBlocking()
122 std::unique_lock<std::mutex> lock(mutex); in GetTraceStatsBlocking()
130 std::mutex mutex; in QueryServiceStateBlocking() local
136 [&mutex, &result, &status_read, &cv](QueryServiceStateCallbackArgs args) { in QueryServiceStateBlocking()
[all …]

12345678910>>...86