aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/source/flqueue.cpp
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2005-04-25 12:50:35 +0000
committerThomas Grill <xovo@users.sourceforge.net>2005-04-25 12:50:35 +0000
commite2e771a22a3fd072b16409932e339ad52b040a91 (patch)
tree1e70c160f99df157d19ed5fd3ebb875567c69892 /externals/grill/flext/source/flqueue.cpp
parent6a08f42af3f1c3584882081936ca18c39693d8a1 (diff)
small fixes
fixes for MSVC6 svn path=/trunk/; revision=2813
Diffstat (limited to 'externals/grill/flext/source/flqueue.cpp')
-rwxr-xr-xexternals/grill/flext/source/flqueue.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/externals/grill/flext/source/flqueue.cpp b/externals/grill/flext/source/flqueue.cpp
index ddfd0303..1cf2aab5 100755
--- a/externals/grill/flext/source/flqueue.cpp
+++ b/externals/grill/flext/source/flqueue.cpp
@@ -26,6 +26,13 @@ WARRANTIES, see the file, "license.txt," in this distribution.
flext::thrid_t flext::thrmsgid = 0;
#endif
+#ifdef FLEXT_SHARED
+/*
+ For the shared version it _should_ be possible to have only one queue for all externals.
+ Yet I don't know how to do this cross-platform
+*/
+#define PERMANENTIDLE
+#endif
static void Trigger();
@@ -196,18 +203,20 @@ static void QTick(flext_base *c)
}
#elif FLEXT_QMODE == 1
-#ifndef FLEXT_SHARED
+#ifndef PERMANENTIDLE
static bool qtickactive = false;
#endif
static t_int QTick(t_int *)
{
-#ifndef FLEXT_SHARED
+#ifndef PERMANENTIDLE
qtickactive = false;
#endif
+
QWork(false);
-#ifdef FLEXT_SHARED
+
+#ifdef PERMANENTIDLE
// will be run in the next idle cycle
- return 2;
+ return 2;
#else
// won't be run again
// for non-shared externals assume that there's rarely a message waiting
@@ -239,7 +248,7 @@ static void Trigger()
#if FLEXT_QMODE == 2
// wake up worker thread
qthrcond.Signal();
- #elif FLEXT_QMODE == 1 && !defined(FLEXT_SHARED)
+ #elif FLEXT_QMODE == 1 && !defined(PERMANENTIDLE)
if(!qtickactive) {
sys_callback(QTick,NULL,0);
qtickactive = true;
@@ -280,7 +289,7 @@ void flext_base::StartQueue()
else started = true;
#if FLEXT_QMODE == 1
-#ifdef FLEXT_SHARED
+#ifdef PERMANENTIDLE
sys_callback(QTick,NULL,0);
#endif
#elif FLEXT_QMODE == 2