Files
MP-SPDZ/Tools/Signal.h
Marcel Keller cc0711c224 MP-SPDZ.
2018-10-11 17:20:26 +11:00

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_ */