Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/adm/src/lib/util/threads/mutex.h @ 10664

Last change on this file since 10664 was 10618, checked in by bknecht, 18 years ago

merged cleanup into trunk (only improvements)

File size: 422 bytes
Line 
1#ifndef __MUTEX_H__
2#define __MUTEX_H__
3
4
5#include "threadincl.h"
6namespace OrxThread
7{
8
9  class Mutex
10  {
11  public:
12    Mutex() {  this->mutex = SDL_CreateMutex(); };
13    ~Mutex() { SDL_DestroyMutex(this->mutex); }
14
15    void lock() { SDL_mutexP(mutex); };
16    void unlock() { SDL_mutexV(mutex); };
17
18    SDL_mutex* getMutex() const { return this->mutex; };
19  private:
20    SDL_mutex* mutex;
21  };
22}
23#endif /* __MUTEX_H__ */
Note: See TracBrowser for help on using the repository browser.