Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/cleanup/src/lib/util/threads/mutex.h @ 10611

Last change on this file since 10611 was 10576, checked in by bensch, 18 years ago

threads better compiled now

File size: 422 bytes
RevLine 
[10574]1#ifndef __MUTEX_H__
2#define __MUTEX_H__
[10576]3
4
5#include "threadincl.h"
6namespace OrxThread
[10574]7{
[10576]8
9  class Mutex
10  {
[10574]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;
[10576]21  };
22}
[10574]23#endif /* __MUTEX_H__ */
Note: See TracBrowser for help on using the repository browser.