mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 13:27:14 +02:00
something
This commit is contained in:
17
slsDetectorSoftware/threadFiles/CondVar.cpp
Normal file
17
slsDetectorSoftware/threadFiles/CondVar.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "CondVar.h"
|
||||
|
||||
CondVar::CondVar() {
|
||||
pthread_cond_init(&m_cond_var, NULL);
|
||||
}
|
||||
CondVar::~CondVar() {
|
||||
pthread_cond_destroy(&m_cond_var);
|
||||
}
|
||||
void CondVar::wait(pthread_mutex_t* mutex) {
|
||||
pthread_cond_wait(&m_cond_var, mutex);
|
||||
}
|
||||
void CondVar::signal() {
|
||||
pthread_cond_signal(&m_cond_var);
|
||||
}
|
||||
void CondVar::broadcast() {
|
||||
pthread_cond_broadcast(&m_cond_var);
|
||||
}
|
Reference in New Issue
Block a user