19 #ifndef SMP_H_INCLUDED 20 #define SMP_H_INCLUDED 107 #define LOCK(mutex, lock) SMP::Lock lock((mutex)) Lock(Mutex &m)
Construct a Lock with a Mutex.
Definition: SMP.cpp:27
~Lock()
Standard destructor.
Definition: SMP.cpp:40
Mutex * m_mutex
Definition: SMP.h:102
Mutex()
Standard constructor (Set the Mutex as unlocked)
Definition: SMP.cpp:23
Class used to handle Mutex.
Definition: SMP.h:74
void lock()
Try to lock the Mutex.
Definition: SMP.cpp:32
void unlock()
Unlock the Mutex.
Definition: SMP.cpp:36
std::atomic< bool > m_lock
Definition: SMP.h:63
A Symmetric multiprocessing implementation.
~Mutex()=default
Standard destructor.
Class used to protect data shared with different threads.
Definition: SMP.h:46
int get_num_cpus()
Returns the number of hardware thread contexts. This value is supposed to be equals to the number of ...
Definition: SMP.cpp:44