aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/tutorial/thread2
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2002-12-22 01:28:34 +0000
committerThomas Grill <xovo@users.sourceforge.net>2002-12-22 01:28:34 +0000
commit99a29c1926eee84f100ad9ea59a8c33f7878c342 (patch)
tree8b9235a630b5839350529d9e255d4f87c2389b5b /externals/grill/flext/tutorial/thread2
parent927c48a90eb2a5ebf9e221041cd963c7377c8349 (diff)
"no message"
svn path=/trunk/; revision=306
Diffstat (limited to 'externals/grill/flext/tutorial/thread2')
-rw-r--r--externals/grill/flext/tutorial/thread2/main.cpp18
-rwxr-xr-xexternals/grill/flext/tutorial/thread2/thread2.cwbin68426 -> 68426 bytes
2 files changed, 9 insertions, 9 deletions
diff --git a/externals/grill/flext/tutorial/thread2/main.cpp b/externals/grill/flext/tutorial/thread2/main.cpp
index bd6354a2..2cdc37c3 100644
--- a/externals/grill/flext/tutorial/thread2/main.cpp
+++ b/externals/grill/flext/tutorial/thread2/main.cpp
@@ -88,18 +88,18 @@ void thread2::m_start(int st)
ToOutInt(0,count); // output loop count
}
- cond.Lock(); // lock conditional
running = false; // change state flag
- cond.Signal(); // signal changed flag to watiting "stop" method
- cond.Unlock(); // unlock conditional
+// cond.Lock(); // lock conditional
+ cond.Signal(); // signal changed flag to waiting "stop" method
+// cond.Unlock(); // unlock conditional
}
void thread2::m_stop()
{
- cond.Lock(); // lock conditional
+// cond.Lock(); // lock conditional
stopit = true; // set termination flag
- while(*(&running) || *(&blipping)) // workaround for CodeWarrior!
+ while(*(&running) || *(&blipping)) // workaround for CodeWarrior (doesn't honor volatile modifier!)
{
cond.Wait(); // wait for signal by running threads
}
@@ -107,7 +107,7 @@ void thread2::m_stop()
// --- Here, the threads should have stopped ---
stopit = false; // reset flag
- cond.Unlock(); // unlock conditional
+// cond.Unlock(); // unlock conditional
}
@@ -126,9 +126,9 @@ void thread2::m_textout()
Sleep(1.f);
}
- cond.Lock(); // lock conditional
blipping = false; // change state flag
- cond.Signal(); // signal changed flag to watiting "stop" method
- cond.Unlock(); // unlock conditional
+// cond.Lock(); // lock conditional
+ cond.Signal(); // signal changed flag to waiting "stop" method
+// cond.Unlock(); // unlock conditional
}
diff --git a/externals/grill/flext/tutorial/thread2/thread2.cw b/externals/grill/flext/tutorial/thread2/thread2.cw
index af968e69..524ad776 100755
--- a/externals/grill/flext/tutorial/thread2/thread2.cw
+++ b/externals/grill/flext/tutorial/thread2/thread2.cw
Binary files differ