/*! * @file threading.h * @brief Definition of Thread Classes. * * These are mainly Classes, that are used for wrapping around SDL_thread */ #ifndef _THREADING_H #define _THREADING_H #ifdef HAVE_SDL_H #include #else #include #endif //! A class for Wrapping Threads class Threading { public: Threading(); virtual ~Threading(); private: }; //! A Class that locks a Mutex within its scope class MutexLock { public: //! Locks the Mutex mutex in this Scope. MutexLock(SDL_mutex* mutex) { SDL_mutexP(mutex); this->mutex = mutex; }; ~MutexLock() { SDL_mutexV(mutex); }; private: SDL_mutex* mutex; //!< The Mutex to lock. }; #endif /* _THREADING_H */