Home | History | Annotate | Download | only in Support

Lines Matching refs:mutex

1 //===- Mutex.cpp - Mutual Exclusion Lock ------------------------*- C++ -*-===//
10 // This file implements the llvm::sys::Mutex class.
15 #include "llvm/Support/Mutex.h"
43 // Construct a Mutex using pthread calls
48 pthread_mutex_t* mutex =
52 // Initialize the mutex attributes
56 // Initialize the mutex as a recursive mutex, if requested, or normal
64 // Make it a process local mutex
69 // Initialize the mutex
70 errorcode = pthread_mutex_init(mutex, &attr);
78 data_ = mutex;
81 // Destruct a Mutex
84 pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_);
85 assert(mutex != 0);
86 pthread_mutex_destroy(mutex);
87 free(mutex);
93 pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_);
94 assert(mutex != 0);
96 int errorcode = pthread_mutex_lock(mutex);
103 pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_);
104 assert(mutex != 0);
106 int errorcode = pthread_mutex_unlock(mutex);
113 pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_);
114 assert(mutex != 0);
116 int errorcode = pthread_mutex_trylock(mutex);
123 #include "Unix/Mutex.inc"
125 #include "Windows/Mutex.inc"
127 #warning Neither LLVM_ON_UNIX nor LLVM_ON_WIN32 was set in Support/Mutex.cpp