[Scummvm-cvs-logs] SF.net SVN: scummvm:[49697] scummvm/trunk/engines/saga

sev at users.sourceforge.net sev at users.sourceforge.net
Tue Jun 15 12:16:32 CEST 2010


Revision: 49697
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49697&view=rev
Author:   sev
Date:     2010-06-15 10:16:32 +0000 (Tue, 15 Jun 2010)

Log Message:
-----------
SAGA: Add more thread-related output.

Modified Paths:
--------------
    scummvm/trunk/engines/saga/script.h
    scummvm/trunk/engines/saga/sthread.cpp

Modified: scummvm/trunk/engines/saga/script.h
===================================================================
--- scummvm/trunk/engines/saga/script.h	2010-06-15 10:16:13 UTC (rev 49696)
+++ scummvm/trunk/engines/saga/script.h	2010-06-15 10:16:32 UTC (rev 49697)
@@ -246,16 +246,19 @@
 	}
 
 	void waitWalk(void *threadObj) {
+		debug(3, "waitWalk()");
 		wait(kWaitTypeWalk);
 		_threadObj = threadObj;
 	}
 
 	void waitDelay(int sleepTime) {
+		debug(3, "waitDelay(%d)", sleepTime);
 		wait(kWaitTypeDelay);
 		_sleepTime = sleepTime;
 	}
 
 	void waitFrames(int frames) {
+		debug(3, "waitFrames(%d)", frames);
 		wait(kWaitTypeWaitFrames);
 		_frameWait = frames;
 	}

Modified: scummvm/trunk/engines/saga/sthread.cpp
===================================================================
--- scummvm/trunk/engines/saga/sthread.cpp	2010-06-15 10:16:13 UTC (rev 49696)
+++ scummvm/trunk/engines/saga/sthread.cpp	2010-06-15 10:16:32 UTC (rev 49697)
@@ -58,6 +58,8 @@
 
 	_threadList.push_front(newThread);
 
+	debug(3, "createThread(). Total threads: %d", _threadList.size());
+
 	ScriptThread &tmp = *_threadList.begin();
 	tmp._stackBuf = (int16 *)malloc(ScriptThread::THREAD_STACK_SIZE * sizeof(int16));
 	tmp._stackTopIndex = ScriptThread::THREAD_STACK_SIZE - 2;
@@ -78,6 +80,8 @@
 void Script::wakeUpThreads(int waitType) {
 	ScriptThreadList::iterator threadIterator;
 
+	debug(3, "wakeUpThreads(%d)", waitType);
+
 	for (threadIterator = _threadList.begin(); threadIterator != _threadList.end(); ++threadIterator) {
 		ScriptThread &thread = *threadIterator;
 		if ((thread._flags & kTFlagWaiting) && (thread._waitType == waitType)) {
@@ -89,6 +93,8 @@
 void Script::wakeUpThreadsDelayed(int waitType, int sleepTime) {
 	ScriptThreadList::iterator threadIterator;
 
+	debug(3, "wakeUpThreads(%d, %d)", waitType, sleepTime);
+
 	for (threadIterator = _threadList.begin(); threadIterator != _threadList.end(); ++threadIterator) {
 		ScriptThread &thread = *threadIterator;
 		if ((thread._flags & kTFlagWaiting) && (thread._waitType == waitType)) {
@@ -169,6 +175,8 @@
 void Script::abortAllThreads() {
 	ScriptThreadList::iterator threadIterator;
 
+	debug(3, "abortAllThreads()");
+
 	threadIterator = _threadList.begin();
 
 	while (threadIterator != _threadList.end()) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list