mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 05:17:13 +02:00
something
This commit is contained in:
27
slsDetectorSoftware/threadFiles/Mutex.h
Normal file
27
slsDetectorSoftware/threadFiles/Mutex.h
Normal file
@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#include <deque>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "Global.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class Mutex
|
||||
{
|
||||
public:
|
||||
Mutex();
|
||||
~Mutex();
|
||||
void lock();
|
||||
void unlock();
|
||||
pthread_mutex_t* get_mutex_ptr();
|
||||
|
||||
private:
|
||||
pthread_mutex_t m_lock;
|
||||
volatile bool is_locked;
|
||||
};
|
Reference in New Issue
Block a user