SAGA2: Add debug output for TaskStack

This commit is contained in:
a/ 2021-08-08 16:31:13 +09:00
parent 4cd2a2d433
commit da759ebfe4

View File

@ -262,12 +262,14 @@ void TaskStackList::newTaskStack(TaskStack *p) {
}
}
for (int i = 0; i < numTaskStacks; i++)
debugC(1, kDebugTasks, "List: %p Adding task stack %p", (void *)this, (void *)p);
for (int i = 0; i < numTaskStacks; i++) {
if (!_list[i]) {
_list[i] = p;
return;
}
}
}
void TaskStackList::newTaskStack(TaskStack *p, TaskID id) {
@ -281,10 +283,12 @@ void TaskStackList::newTaskStack(TaskStack *p, TaskID id) {
// back into the inactive list
void TaskStackList::deleteTaskStack(TaskStack *p) {
for (int i = 0; i < numTaskStacks; i++)
debugC(1, kDebugTasks, "List: %p Deleting task stack %p", (void *)this, (void *)p);
for (int i = 0; i < numTaskStacks; i++) {
if (_list[i] == p) {
_list[i] = nullptr;
}
}
}
//----------------------------------------------------------------------