From 6453bdb49bd08b3f8cec729f36fd75099e80a174 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Tue, 7 Jun 2005 14:40:19 +0000 Subject: cosmetic stuff corrections to config build templates digest one-element list messages as single atoms made flext::Forward threadsafe simplified message analysis svn path=/trunk/; revision=3127 --- externals/grill/flext/source/flsupport.h | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'externals/grill/flext/source/flsupport.h') diff --git a/externals/grill/flext/source/flsupport.h b/externals/grill/flext/source/flsupport.h index 31fe91ff..3226b39e 100644 --- a/externals/grill/flext/source/flsupport.h +++ b/externals/grill/flext/source/flsupport.h @@ -781,11 +781,21 @@ public: //! @} FLEXT_S_LOCK -#ifdef FLEXT_THREADS /*! \defgroup FLEXT_S_THREAD Flext thread handling @{ */ + //! Check if current thread is the realtime system's thread + static bool IsSystemThread() { +#ifdef FLEXT_THREADS + return IsThread(GetSysThreadId()); +#else + return true; +#endif + } + +#ifdef FLEXT_THREADS + //! thread type #if FLEXT_THREADS == FLEXT_THR_MP typedef MPTaskID thrid_t; @@ -813,7 +823,7 @@ public: /*! \brief Get system thread id */ - static thrid_t GetSysThreadId(); + static thrid_t GetSysThreadId() { return thrid; } //! Check if current thread should terminate static bool ShouldExit(); @@ -829,9 +839,6 @@ public: #endif } - //! Check if current thread is the realtime system's thread - static bool IsSystemThread() { return IsThread(GetSysThreadId()); } - /*! \brief Thread parameters \internal @@ -852,9 +859,9 @@ public: float _float; int _int; t_symptr _t_symptr; - struct { AtomAnything *args; } _any; - struct { AtomList *args; } _list; - struct { void *data; } _ext; + AtomAnything *_any; + AtomList *_list; + void *_ext; } *var; }; @@ -1093,11 +1100,10 @@ public: */ static bool StopThread(void (*meth)(thr_params *p),thr_params *params = NULL,bool wait = false); -//! @} FLEXT_S_THREAD - - #endif // FLEXT_THREADS +//! @} FLEXT_S_THREAD + // --- timer stuff ----------------------------------------------- -- cgit v1.2.1