Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #elif defined(OG_LINUX)
- Mutex::Mutex()
- {
- pthread_mutex_t *mutex = new pthread_mutex_t;
- data = mutex;
- pthread_mutex_init( mutex, NULL);
- }
- Mutex::~Mutex(){
- pthread_mutex_t *mutex = static_cast<pthread_mutex_t*>(data);
- pthread_mutex_destroy( mutex );
- delete mutex;
- }
- void Mutex::Lock( void )
- {
- pthread_mutex_trylock(static_cast<pthread_mutex_t*>(data));
- }
- void Mutex::Unlock( void )
- {
- pthread_mutex_unlock(static_cast<pthread_mutex_t*>(data));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement