mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-27 05:32:45 +00:00
BACKENDS: Added debug output for race condition. Guarded by an #ifdef
This commit is contained in:
parent
ca178f0fd8
commit
75a4e622c2
@ -69,8 +69,15 @@ DefaultTimerManager::DefaultTimerManager() :
|
||||
}
|
||||
|
||||
DefaultTimerManager::~DefaultTimerManager() {
|
||||
#ifdef DIRECTORBUILDBOT
|
||||
warning("~DefaultTimerManager");
|
||||
#endif
|
||||
Common::StackLock lock(_mutex);
|
||||
|
||||
#ifdef DIRECTORBUILDBOT
|
||||
warning("~DefaultTimerManager: locked");
|
||||
#endif
|
||||
|
||||
TimerSlot *slot = _head;
|
||||
while (slot) {
|
||||
TimerSlot *next = slot->next;
|
||||
@ -78,10 +85,20 @@ DefaultTimerManager::~DefaultTimerManager() {
|
||||
slot = next;
|
||||
}
|
||||
_head = 0;
|
||||
|
||||
#ifdef DIRECTORBUILDBOT
|
||||
warning("~DefaultTimerManager: completed");
|
||||
#endif
|
||||
}
|
||||
|
||||
void DefaultTimerManager::handler() {
|
||||
#ifdef DIRECTORBUILDBOT
|
||||
warning("DefaultTimerManager::handler(): locking");
|
||||
#endif
|
||||
Common::StackLock lock(_mutex);
|
||||
#ifdef DIRECTORBUILDBOT
|
||||
warning("DefaultTimerManager::handler(): locked");
|
||||
#endif
|
||||
|
||||
uint32 curTime = g_system->getMillis(true);
|
||||
|
||||
|
@ -32,8 +32,16 @@
|
||||
static volatile bool timerInstalled = false;
|
||||
|
||||
static Uint32 timer_handler(Uint32 interval, void *param) {
|
||||
if (!timerInstalled)
|
||||
if (!timerInstalled) {
|
||||
#ifdef DIRECTORBUILDBOT
|
||||
warning("timer_handler: timer is not installed");
|
||||
#endif
|
||||
return interval;
|
||||
}
|
||||
|
||||
#ifdef DIRECTORBUILDBOT
|
||||
warning("timer_handler: called");
|
||||
#endif
|
||||
|
||||
((DefaultTimerManager *)param)->handler();
|
||||
return interval;
|
||||
@ -52,9 +60,16 @@ SdlTimerManager::SdlTimerManager() {
|
||||
}
|
||||
|
||||
SdlTimerManager::~SdlTimerManager() {
|
||||
#ifdef DIRECTORBUILDBOT
|
||||
warning("~SdlTimerManager");
|
||||
#endif
|
||||
timerInstalled = false;
|
||||
// Removes the timer callback
|
||||
SDL_RemoveTimer(_timerID);
|
||||
|
||||
#ifdef DIRECTORBUILDBOT
|
||||
warning("~SdlTimerManager: SDL timer removed");
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user