Home | History | Annotate | Download | only in Common

Lines Matching defs:mutex

21 // Use a pthread mutex on Linux. Since many processes may use SwiftShader
32 pthread_mutex_init(&mutex, NULL);
37 pthread_mutex_destroy(&mutex);
42 return pthread_mutex_trylock(&mutex) == 0;
47 pthread_mutex_lock(&mutex);
52 pthread_mutex_unlock(&mutex);
56 pthread_mutex_t mutex;
71 mutex = 0;
78 if(mutex.exchange(true) == false)
153 mutex.store(false, std::memory_order_release);
158 return mutex.load(std::memory_order_acquire);
164 // Ensure that the mutex variable is on its own 64-byte cache line to avoid false sharing
167 std::atomic<bool> mutex;
180 explicit LockGuard(sw::MutexLock &mutex) : mutex(mutex)
182 mutex.lock();
187 mutex.unlock();
191 sw::MutexLock &mutex;