From e2e771a22a3fd072b16409932e339ad52b040a91 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Mon, 25 Apr 2005 12:50:35 +0000 Subject: small fixes fixes for MSVC6 svn path=/trunk/; revision=2813 --- externals/grill/flext/source/flqueue.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'externals/grill/flext/source/flqueue.cpp') 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 -- cgit v1.2.1