[Scummvm-cvs-logs] scummvm master -> 01020089da07451336548dcaeb9365a3086911b8

lordhoto lordhoto at gmail.com
Tue Feb 9 02:53:15 CET 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
01020089da SAGA: Add comments about possibly race conditions to timer callbacks.


Commit: 01020089da07451336548dcaeb9365a3086911b8
    https://github.com/scummvm/scummvm/commit/01020089da07451336548dcaeb9365a3086911b8
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-02-09T02:52:29+01:00

Commit Message:
SAGA: Add comments about possibly race conditions to timer callbacks.

(cherry picked from commit 93f627441ac68e7a4c3e7f748a7b6f999bd9c96a)

Changed paths:
    engines/saga/interface.cpp
    engines/saga/music.cpp
    engines/saga/puzzle.cpp
    engines/saga/render.cpp



diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index 44581f2..cb42ac0 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -332,6 +332,9 @@ void Interface::saveReminderCallback(void *refCon) {
 }
 
 void Interface::updateSaveReminder() {
+	// CHECKME: This is potentially called from a different thread because it is
+	// called from a timer callback. However, it does not seem to take any
+	// precautions to avoid race conditions.
 	if (_active && _panelMode == kPanelMain) {
 		_saveReminderState = _saveReminderState % _vm->getDisplayInfo().saveReminderNumSprites + 1;
 		drawStatusBar();
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp
index 663f599..cd48eba 100644
--- a/engines/saga/music.cpp
+++ b/engines/saga/music.cpp
@@ -224,6 +224,9 @@ void Music::musicVolumeGaugeCallback(void *refCon) {
 }
 
 void Music::musicVolumeGauge() {
+	// CHECKME: This is potentially called from a different thread because it is
+	// called from a timer callback. However, it does not seem to take any
+	// precautions to avoid race conditions.
 	int volume;
 
 	_currentVolumePercent += 10;
diff --git a/engines/saga/puzzle.cpp b/engines/saga/puzzle.cpp
index 705834f..099bf79 100644
--- a/engines/saga/puzzle.cpp
+++ b/engines/saga/puzzle.cpp
@@ -399,6 +399,9 @@ void Puzzle::hintTimerCallback(void *refCon) {
 }
 
 void Puzzle::solicitHint() {
+	// CHECKME: This is potentially called from a different thread because it is
+	// called from a timer callback. However, it does not seem to take any
+	// precautions to avoid race conditions.
 	int i;
 
 	_vm->_actor->setSpeechColor(1, kITEColorBlack);
diff --git a/engines/saga/render.cpp b/engines/saga/render.cpp
index 1f23a38..b932e22 100644
--- a/engines/saga/render.cpp
+++ b/engines/saga/render.cpp
@@ -276,6 +276,9 @@ void Render::fpsTimerCallback(void *refCon) {
 }
 
 void Render::fpsTimer() {
+	// CHECKME: This is potentially called from a different thread because it is
+	// called from a timer callback. However, it does not seem to take any
+	// precautions to avoid race conditions.
 	_fps = _renderedFrameCount;
 	_renderedFrameCount = 0;
 }






More information about the Scummvm-git-logs mailing list