2010-12-02 02:02:02 +01:00
|
|
|
/*
|
|
|
|
* This file is a part of Winix
|
|
|
|
* and is not publicly distributed
|
|
|
|
*
|
|
|
|
* Copyright (c) 2010, Tomasz Sowa
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2011-01-23 15:15:30 +01:00
|
|
|
#ifndef headerfile_winix_core_synchro
|
|
|
|
#define headerfile_winix_core_synchro
|
2010-12-02 02:02:02 +01:00
|
|
|
|
|
|
|
#include <pthread.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct Synchro
|
|
|
|
{
|
|
|
|
// one global mutex
|
|
|
|
pthread_mutex_t mutex;
|
|
|
|
|
|
|
|
|
|
|
|
// true when winix is closing
|
|
|
|
volatile bool was_stop_signal;
|
|
|
|
|
|
|
|
|
|
|
|
Synchro();
|
|
|
|
|
|
|
|
bool Lock();
|
|
|
|
void Unlock();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|