ADTF  3.18.3
fast_mutex.h
Go to the documentation of this file.
1 
15 #ifndef A_UTIL_UTIL_CONCURRENCY_FAST_MUTEX_HEADER_INCLUDED
16 #define A_UTIL_UTIL_CONCURRENCY_FAST_MUTEX_HEADER_INCLUDED
17 
19 
20 namespace a_util {
21 namespace concurrency {
23 class fast_mutex {
24 public: // types
26  typedef void* native_handle_type;
27 
28 public:
31 
34 
36  void lock();
37 
42  bool try_lock();
43 
45  void unlock();
46 
54 
55 private:
56  class Implementation;
58 };
59 
60 } // namespace concurrency
61 } // namespace a_util
62 
63 #endif // A_UTIL_UTIL_CONCURRENCY_FAST_MUTEX_HEADER_INCLUDED
Fast mutex class, implemented as an atomic spin lock with very low CPU overhead.
Definition: fast_mutex.h:23
void unlock()
Unlock the mutex.
bool try_lock()
Try to lock the mutex.
void lock()
Lock the mutex.
void * native_handle_type
Type of a native handle.
Definition: fast_mutex.h:26
native_handle_type native_handle()
Get the native handle of the mutex.
Serves as the root component, with common functionality documented in core functionality.
Definition: base.h:24
Common include for StackPtr functionality.