Update of /cvsroot/pure-data/externals/grill/flext/source
In directory sc8-pr-cvs1:/tmp/cvs-serv24660/source
Modified Files:
flclass.h flout.cpp flqueue.cpp flsupport.h
Log Message:
""
Index: flclass.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flclass.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** flclass.h 20 Oct 2003 02:32:51 -0000 1.39
--- flclass.h 10 Nov 2003 03:32:53 -0000 1.40
***************
*** 836,839 ****
--- 836,843 ----
//! Start message queue
static void StartQueue();
+ #ifdef FLEXT_QTHR
+ //! Queue worker function
+ static void QWorker(thr_params *);
+ #endif
//! Flush messages in the queue
static void QFlush(flext_base *th = NULL);
Index: flout.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flout.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** flout.cpp 1 Jul 2003 02:32:46 -0000 1.13
--- flout.cpp 10 Nov 2003 03:32:53 -0000 1.14
***************
*** 39,57 ****
#endif
! #ifndef FLEXT_THREADS
! void flext_base::ToOutBang(int n) const { ToSysBang(n); }
! void flext_base::ToOutFloat(int n,float f) const { ToSysFloat(n,f); }
! void flext_base::ToOutInt(int n,int f) const { ToSysInt(n,f); }
! void flext_base::ToOutSymbol(int n,const t_symbol *s) const { ToSysSymbol(n,s); }
! void flext_base::ToOutList(int n,int argc,const t_atom *argv) const { ToSysList(n,argc,argv); }
! void flext_base::ToOutAnything(int n,const t_symbol *s,int argc,const t_atom *argv) const { ToSysAnything(n,s,argc,argv); }
#else
! void flext_base::ToOutBang(int n) const { if(IsSystemThread()) ToSysBang(n); else ToQueueBang(n); }
! void flext_base::ToOutFloat(int n,float f) const { if(IsSystemThread()) ToSysFloat(n,f); else ToQueueFloat(n,f); }
! void flext_base::ToOutInt(int n,int f) const { if(IsSystemThread()) ToSysInt(n,f); else ToQueueInt(n,f); }
! void flext_base::ToOutSymbol(int n,const t_symbol *s) const { if(IsSystemThread()) ToSysSymbol(n,s); else ToQueueSymbol(n,s); }
! void flext_base::ToOutList(int n,int argc,const t_atom *argv) const { if(IsSystemThread()) ToSysList(n,argc,argv); else ToQueueList(n,argc,argv); }
! void flext_base::ToOutAnything(int n,const t_symbol *s,int argc,const t_atom *argv) const { if(IsSystemThread()) ToSysAnything(n,s,argc,argv); else ToQueueAnything(n,s,argc,argv); }
#endif
--- 39,58 ----
#endif
! #if defined(FLEXT_THREADS)
! #if defined(FLEXT_QTHR)
! #define CHKTHR() (IsSystemThread() || IsThread(flext::thrmsgid))
! #else
! #define CHKTHR() IsSystemThread()
! #endif
#else
! #define CHKTHR() true
#endif
+
+ void flext_base::ToOutBang(int n) const { if(CHKTHR()) ToSysBang(n); else ToQueueBang(n); }
+ void flext_base::ToOutFloat(int n,float f) const { if(CHKTHR()) ToSysFloat(n,f); else ToQueueFloat(n,f); }
+ void flext_base::ToOutInt(int n,int f) const { if(CHKTHR()) ToSysInt(n,f); else ToQueueInt(n,f); }
+ void flext_base::ToOutSymbol(int n,const t_symbol *s) const { if(CHKTHR()) ToSysSymbol(n,s); else ToQueueSymbol(n,s); }
+ void flext_base::ToOutList(int n,int argc,const t_atom *argv) const { if(CHKTHR()) ToSysList(n,argc,argv); else ToQueueList(n,argc,argv); }
+ void flext_base::ToOutAnything(int n,const t_symbol *s,int argc,const t_atom *argv) const { if(CHKTHR()) ToSysAnything(n,s,argc,argv); else ToQueueAnything(n,s,argc,argv); }
Index: flqueue.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flqueue.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** flqueue.cpp 3 Sep 2003 02:32:49 -0000 1.11
--- flqueue.cpp 10 Nov 2003 03:32:53 -0000 1.12
***************
*** 20,23 ****
--- 20,26 ----
#include "flinternal.h"
+ //! Thread id of message queue thread
+ flext::thrid_t flext::thrmsgid = 0;
+
class qmsg
{
***************
*** 238,243 ****
#ifdef FLEXT_QTHR
! void QWorker(flext::thr_params *)
{
for(;;) {
qthrcond.Wait();
--- 241,247 ----
#ifdef FLEXT_QTHR
! void flext_base::QWorker(thr_params *)
{
+ thrmsgid = GetThreadId();
for(;;) {
qthrcond.Wait();
Index: flsupport.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flsupport.h,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** flsupport.h 24 Sep 2003 02:34:55 -0000 1.52
--- flsupport.h 10 Nov 2003 03:32:53 -0000 1.53
***************
*** 721,725 ****
protected:
! static thrid_t thrhelpid;
static bool StartHelper();
static bool StopHelper();
--- 721,725 ----
protected:
! static thrid_t thrhelpid,thrmsgid;
static bool StartHelper();
static bool StopHelper();