mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-11 06:27:56 -05:00
27 lines
342 B
C++
27 lines
342 B
C++
/*
|
|
* Signal.h
|
|
*
|
|
*/
|
|
|
|
#ifndef TOOLS_SIGNAL_H_
|
|
#define TOOLS_SIGNAL_H_
|
|
|
|
#include <pthread.h>
|
|
|
|
class Signal
|
|
{
|
|
pthread_mutex_t mutex;
|
|
pthread_cond_t cond;
|
|
|
|
public:
|
|
Signal();
|
|
virtual ~Signal();
|
|
void lock();
|
|
void unlock();
|
|
void wait();
|
|
int wait(int seconds);
|
|
void broadcast();
|
|
};
|
|
|
|
#endif /* TOOLS_SIGNAL_H_ */
|