Home
last modified time | relevance | path

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

12345678910>>...49

/external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/
DSynchronized.java59 final Object mutex; field in Synchronized.SynchronizedObject
61 SynchronizedObject(Object delegate, @Nullable Object mutex) { in SynchronizedObject() argument
63 this.mutex = (mutex == null) ? this : mutex; in SynchronizedObject()
73 synchronized (mutex) { in toString()
85 Collection<E> collection, @Nullable Object mutex) { in collection() argument
86 return new SynchronizedCollection<E>(collection, mutex); in collection()
92 Collection<E> delegate, @Nullable Object mutex) { in SynchronizedCollection() argument
93 super(delegate, mutex); in SynchronizedCollection()
103 synchronized (mutex) { in add()
110 synchronized (mutex) { in addAll()
[all …]
/external/guava/guava/src/com/google/common/collect/
DSynchronized.java65 final Object mutex; field in Synchronized.SynchronizedObject
67 SynchronizedObject(Object delegate, @Nullable Object mutex) { in SynchronizedObject() argument
69 this.mutex = (mutex == null) ? this : mutex; in SynchronizedObject()
79 synchronized (mutex) { in toString()
91 synchronized (mutex) { in writeObject()
101 Collection<E> collection, @Nullable Object mutex) { in collection() argument
102 return new SynchronizedCollection<E>(collection, mutex); in collection()
108 Collection<E> delegate, @Nullable Object mutex) { in SynchronizedCollection() argument
109 super(delegate, mutex); in SynchronizedCollection()
119 synchronized (mutex) { in add()
[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/System/
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 …]
/external/jemalloc/include/jemalloc/internal/
Dmutex.h65 bool malloc_mutex_init(malloc_mutex_t *mutex, const char *name,
67 void malloc_mutex_prefork(tsdn_t *tsdn, malloc_mutex_t *mutex);
68 void malloc_mutex_postfork_parent(tsdn_t *tsdn, malloc_mutex_t *mutex);
69 void malloc_mutex_postfork_child(tsdn_t *tsdn, malloc_mutex_t *mutex);
77 void malloc_mutex_lock(tsdn_t *tsdn, malloc_mutex_t *mutex);
78 void malloc_mutex_unlock(tsdn_t *tsdn, malloc_mutex_t *mutex);
79 void malloc_mutex_assert_owner(tsdn_t *tsdn, malloc_mutex_t *mutex);
80 void malloc_mutex_assert_not_owner(tsdn_t *tsdn, malloc_mutex_t *mutex);
85 malloc_mutex_lock(tsdn_t *tsdn, malloc_mutex_t *mutex) in malloc_mutex_lock() argument
89 witness_assert_not_owner(tsdn, &mutex->witness); in malloc_mutex_lock()
[all …]
/external/libusb/libusb/os/
Dthreads_windows.c34 int usbi_mutex_static_lock(usbi_mutex_static_t *mutex) in usbi_mutex_static_lock() argument
36 if (!mutex) in usbi_mutex_static_lock()
38 while (InterlockedExchange(mutex, 1) == 1) in usbi_mutex_static_lock()
43 int usbi_mutex_static_unlock(usbi_mutex_static_t *mutex) in usbi_mutex_static_unlock() argument
45 if (!mutex) in usbi_mutex_static_unlock()
47 InterlockedExchange(mutex, 0); in usbi_mutex_static_unlock()
51 int usbi_mutex_init(usbi_mutex_t *mutex) in usbi_mutex_init() argument
53 if (!mutex) in usbi_mutex_init()
55 *mutex = CreateMutex(NULL, FALSE, NULL); in usbi_mutex_init()
56 if (!*mutex) in usbi_mutex_init()
[all …]
/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.c52 _cups_mutex_t *mutex, /* I - Mutex */ in _cupsCondWait() argument
62 pthread_cond_timedwait(cond, mutex, &abstime); in _cupsCondWait()
65 pthread_cond_wait(cond, mutex); in _cupsCondWait()
74 _cupsMutexInit(_cups_mutex_t *mutex) /* I - Mutex */ in _cupsMutexInit() argument
76 pthread_mutex_init(mutex, NULL); in _cupsMutexInit()
85 _cupsMutexLock(_cups_mutex_t *mutex) /* I - Mutex */ in _cupsMutexLock() argument
87 pthread_mutex_lock(mutex); in _cupsMutexLock()
96 _cupsMutexUnlock(_cups_mutex_t *mutex) /* I - Mutex */ in _cupsMutexUnlock() argument
98 pthread_mutex_unlock(mutex); in _cupsMutexUnlock()
235 _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/guava-tests/test/com/google/common/collect/
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 peek()
69 assertTrue(Thread.holdsLock(mutex)); in element()
76 assertFalse(Thread.holdsLock(mutex)); in iterator()
82 assertTrue(Thread.holdsLock(mutex)); in size()
88 assertTrue(Thread.holdsLock(mutex)); in removeAll()
[all …]
DSynchronizedNavigableMapTest.java49 TestMap<K, V> inner = new TestMap<K, V>(innermost, mutex); in create()
50 NavigableMap<K, V> outer = Synchronized.navigableMap(inner, mutex); in create()
57 private final Object mutex; field in SynchronizedNavigableMapTest.TestEntry
59 TestEntry(Entry<K, V> delegate, Object mutex) { in TestEntry() argument
61 this.mutex = mutex; in TestEntry()
69 assertTrue(Thread.holdsLock(mutex)); in equals()
74 assertTrue(Thread.holdsLock(mutex)); in getKey()
79 assertTrue(Thread.holdsLock(mutex)); in getValue()
84 assertTrue(Thread.holdsLock(mutex)); in hashCode()
89 assertTrue(Thread.holdsLock(mutex)); in setValue()
[all …]
DSynchronizedMapTest.java39 public final Object mutex = new Integer(1); // something Serializable field in SynchronizedMapTest
42 TestMap<K, V> inner = new TestMap<K, V>(new HashMap<K, V>(), mutex); in create()
43 Map<K, V> outer = Synchronized.map(inner, mutex); in create()
49 public final Object mutex; field in SynchronizedMapTest.TestMap
51 public TestMap(Map<K, V> delegate, Object mutex) { in TestMap() argument
52 checkNotNull(mutex); in TestMap()
54 this.mutex = mutex; in TestMap()
62 assertTrue(Thread.holdsLock(mutex)); in size()
67 assertTrue(Thread.holdsLock(mutex)); in isEmpty()
72 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/jemalloc/src/
Dmutex.c67 JEMALLOC_EXPORT int _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex,
72 malloc_mutex_init(malloc_mutex_t *mutex, const char *name, witness_rank_t rank) in malloc_mutex_init() argument
77 InitializeSRWLock(&mutex->lock); in malloc_mutex_init()
79 if (!InitializeCriticalSectionAndSpinCount(&mutex->lock, in malloc_mutex_init()
84 mutex->lock = OS_UNFAIR_LOCK_INIT; in malloc_mutex_init()
86 mutex->lock = 0; in malloc_mutex_init()
89 mutex->postponed_next = postponed_mutexes; in malloc_mutex_init()
90 postponed_mutexes = mutex; in malloc_mutex_init()
92 if (_pthread_mutex_init_calloc_cb(&mutex->lock, in malloc_mutex_init()
102 if (pthread_mutex_init(&mutex->lock, &attr) != 0) { in malloc_mutex_init()
[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 …]
Dthread_atheos.h27 static int fastmutex_create(const char *name, fastmutex_t * mutex);
28 static int fastmutex_destroy(fastmutex_t * mutex);
29 static int fastmutex_lock(fastmutex_t * mutex);
30 static int fastmutex_timedlock(fastmutex_t * mutex, bigtime_t timeout);
31 static int fastmutex_unlock(fastmutex_t * mutex);
34 static int fastmutex_create(const char *name, fastmutex_t * mutex) in fastmutex_create() argument
36 mutex->count = 0; in fastmutex_create()
37 mutex->sem = create_semaphore(name, 0, 0); in fastmutex_create()
38 return (mutex->sem < 0) ? -1 : 0; in fastmutex_create()
42 static int fastmutex_destroy(fastmutex_t * mutex) in fastmutex_destroy() argument
[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 …]
/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/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/squashfs-tools/squashfs-tools/
Dcaches-queues-lists.c56 pthread_mutex_init(&queue->mutex, NULL); in queue_init()
68 pthread_cleanup_push((void *) pthread_mutex_unlock, &queue->mutex); in queue_put()
69 pthread_mutex_lock(&queue->mutex); in queue_put()
72 pthread_cond_wait(&queue->full, &queue->mutex); in queue_put()
85 pthread_cleanup_push((void *) pthread_mutex_unlock, &queue->mutex); in queue_get()
86 pthread_mutex_lock(&queue->mutex); in queue_get()
89 pthread_cond_wait(&queue->empty, &queue->mutex); in queue_get()
104 pthread_cleanup_push((void *) pthread_mutex_unlock, &queue->mutex); in queue_empty()
105 pthread_mutex_lock(&queue->mutex); in queue_empty()
117 pthread_cleanup_push((void *) pthread_mutex_unlock, &queue->mutex); in queue_flush()
[all …]
/external/llvm/lib/Support/
DMutex.cpp48 pthread_mutex_t* mutex = in MutexImpl() local
63 errorcode = pthread_mutex_init(mutex, &attr); in MutexImpl()
71 data_ = mutex; in MutexImpl()
77 pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_); in ~MutexImpl() local
78 assert(mutex != nullptr); in ~MutexImpl()
79 pthread_mutex_destroy(mutex); in ~MutexImpl()
80 free(mutex); in ~MutexImpl()
86 pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_); in acquire() local
87 assert(mutex != nullptr); in acquire()
89 int errorcode = pthread_mutex_lock(mutex); in acquire()
[all …]
/external/swiftshader/third_party/llvm-subzero/lib/Support/
DMutex.cpp48 pthread_mutex_t* mutex = in MutexImpl() local
63 errorcode = pthread_mutex_init(mutex, &attr); in MutexImpl()
71 data_ = mutex; in MutexImpl()
77 pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_); in ~MutexImpl() local
78 assert(mutex != nullptr); in ~MutexImpl()
79 pthread_mutex_destroy(mutex); in ~MutexImpl()
80 free(mutex); in ~MutexImpl()
86 pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_); in acquire() local
87 assert(mutex != nullptr); in acquire()
89 int errorcode = pthread_mutex_lock(mutex); in acquire()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Support/
DMutex.cpp49 pthread_mutex_t* mutex = in MutexImpl() local
65 errorcode = pthread_mutex_init(mutex, &attr); in MutexImpl()
73 data_ = mutex; in MutexImpl()
79 pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_); in ~MutexImpl() local
80 assert(mutex != nullptr); in ~MutexImpl()
81 pthread_mutex_destroy(mutex); in ~MutexImpl()
82 free(mutex); in ~MutexImpl()
88 pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_); in acquire() local
89 assert(mutex != nullptr); in acquire()
91 int errorcode = pthread_mutex_lock(mutex); in acquire()
[all …]
/external/deqp/framework/delibs/dethread/
DdeThreadTest.c176 deMutex mutex = *((deMutex*)arg); in mutexTestThr1() local
178 deMutex_lock(mutex); in mutexTestThr1()
179 deMutex_unlock(mutex); in mutexTestThr1()
184 deMutex mutex; member
198 deMutex_lock(data->mutex); in mutexTestThr2()
202 deMutex_unlock(data->mutex); in mutexTestThr2()
213 deMutex_unlock(data->mutex); in mutexTestThr2()
218 deMutex_lock(data->mutex); in mutexTestThr2()
220 deMutex_unlock(data->mutex); in mutexTestThr2()
225 deMutex mutex = *((deMutex*)arg); in mutexTestThr3() local
[all …]
/external/icu/icu4c/source/common/
Dumutex.cpp103 umtx_lock(UMutex *mutex) { in umtx_lock() argument
104 if (mutex == NULL) { in umtx_lock()
105 mutex = &globalMutex; in umtx_lock()
107 CRITICAL_SECTION *cs = &mutex->fCS; in umtx_lock()
108 umtx_initOnce(mutex->fInitOnce, winMutexInit, cs); in umtx_lock()
113 umtx_unlock(UMutex* mutex) in umtx_unlock() argument
115 if (mutex == NULL) { in umtx_unlock()
116 mutex = &globalMutex; in umtx_unlock()
118 LeaveCriticalSection(&mutex->fCS); in umtx_unlock()
144 umtx_condWait(UConditionVar *condition, UMutex *mutex) { in umtx_condWait() argument
[all …]

12345678910>>...49