Changeset 10577 in orxonox.OLD for branches/cleanup/src/lib/util/threads
- Timestamp:
- Feb 7, 2007, 9:31:36 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cleanup/src/lib/util/threads/mutex_locker.h
r10576 r10577 8 8 9 9 //! A Class that locks a Mutex within its scope 10 class MutexLock 10 class MutexLocker 11 11 { 12 12 public: 13 13 //! Locks the Mutex mutex in this Scope. 14 MutexLock (Mutex* mutex) { SDL_mutexP(mutex->getMutex()); this->mutex = mutex; };15 ~MutexLock () { SDL_mutexV(mutex->getMutex()); };14 MutexLocker(Mutex* mutex) { SDL_mutexP(mutex->getMutex()); this->mutex = mutex; }; 15 ~MutexLocker() { SDL_mutexV(mutex->getMutex()); }; 16 16 private: 17 17 Mutex* mutex; //!< The Mutex to lock.
Note: See TracChangeset
for help on using the changeset viewer.