#include <mutex.h>
Inherited by InputManager.
Inheritance diagram for Mutex:

Public Member Functions | |
| Mutex () | |
| inits m_mutex and m_rwlock | |
| ~Mutex () | |
| void | lock () |
| Lock mutex. | |
| void | unlock () |
| Unlock mutex. | |
Protected Attributes | |
| SDL_mutex * | mSDLMutex |
| SDL mutex. It is created in constructor and destoryed in destructor. | |
Implementation using SDL mutex. If creation of mutex fail the whole program may fall badly, because the error is logged. This is case of sigleton.s Usage is esay. Just use methods lock and unlock.
Definition at line 24 of file mutex.h.
|
|
inits m_mutex and m_rwlock
Definition at line 15 of file mutex.cpp. References DIE(), LOGE, and mSDLMutex. Here is the call graph for this function: ![]() |
|
|
Definition at line 28 of file mutex.cpp. References mSDLMutex. |
|
|
Lock mutex. Die on error. Definition at line 34 of file mutex.cpp. References DIE(), LOGE, and mSDLMutex. Referenced by Commander::addCommand(), Console::addConsoleMessage(), GameServer::getMapName(), Thread::getStop(), TimeManager::getTicks(), Thread::isRunning(), Game::isRunning(), InputManager::keyDown(), Thread::needWait(), Commander::processAllCommands(), InputManager::processKeys(), Console::render(), GameServer::setMapName(), Thread::setRunning(), Game::setRunning(), Thread::setStop(), Thread::start(), Thread::wait(), and InputManager::WantAllInput(). Here is the call graph for this function: ![]() |
|
|
Unlock mutex. Die on error. Definition at line 44 of file mutex.cpp. References DIE(), LOGE, and mSDLMutex. Referenced by Commander::addCommand(), GameServer::getMapName(), Thread::getStop(), TimeManager::getTicks(), Thread::isRunning(), Game::isRunning(), InputManager::keyDown(), Thread::needWait(), Commander::processAllCommands(), InputManager::processKeys(), GameServer::setMapName(), Thread::setRunning(), Game::setRunning(), Thread::setStop(), Thread::start(), Thread::wait(), and InputManager::WantAllInput(). Here is the call graph for this function: ![]() |
|
|
SDL mutex. It is created in constructor and destoryed in destructor.
|
1.4.5