diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2005-07-06 16:08:20 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2005-07-06 16:08:20 +0000 |
commit | 216da4973fc523fc207d5d0f5986da227e7e6665 (patch) | |
tree | 41a77238b1b922bc8855ec54a861e76b3eb89336 /externals/grill/flext/source/flthr.cpp | |
parent | 8d2c1c06ae0d256689d3ec6de169f9bf75d96028 (diff) |
changed initialization functions accordingly
FIFO code with mutex lock
c++ conformance fix
fixes for Codewarrior
updates for OSX
extracted maps into flmap.h
fix for BCC
made flext::Forward threadsafe
don't install build system yet
digest one-element list messages as single atoms
updated tutorials
fixes for MSVC6
documentation
slimmed object data structures
simplified message analysis
corrected flext version to 0.4.5
added X86-64 code for lockfree fifos
preparation of release
upgraded version number
svn path=/trunk/; revision=3292
Diffstat (limited to 'externals/grill/flext/source/flthr.cpp')
-rw-r--r-- | externals/grill/flext/source/flthr.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/externals/grill/flext/source/flthr.cpp b/externals/grill/flext/source/flthr.cpp index fb2a28b5..e7e534eb 100644 --- a/externals/grill/flext/source/flthr.cpp +++ b/externals/grill/flext/source/flthr.cpp @@ -25,7 +25,7 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include <time.h> -#if FLEXT_OSAPI == FLEXT_OSAPI_UNIX_POSIX || FLEXT_OSAPI == FLEXT_OSAPI_WIN_POSIX +#if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH || FLEXT_OSAPI == FLEXT_OSAPI_UNIX_POSIX || FLEXT_OSAPI == FLEXT_OSAPI_WIN_POSIX #include <sys/time.h> #include <unistd.h> #elif FLEXT_OS == FLEXT_OS_WIN @@ -51,7 +51,7 @@ class thr_entry , public Fifo::Cell { public: - void thr_entry::Set(void (*m)(thr_params *),thr_params *p,thrid_t id = GetThreadId()) + void Set(void (*m)(thr_params *),thr_params *p,thrid_t id = GetThreadId()) { th = p?p->cl:NULL; meth = m,params = p,thrid = id; @@ -91,7 +91,7 @@ public: thr_entry *fnd; while((fnd = Pop()) && !fnd->Is(id)) qutmp.Push(fnd); // put back entries - for(thr_entry *ti; ti = qutmp.Pop(); ) Push(ti); + for(thr_entry *ti; (ti = qutmp.Pop()) != NULL; ) Push(ti); if(fnd && !pop) Push(fnd); return fnd; } @@ -180,7 +180,7 @@ void flext::ThrHelper(void *) // start all inactive threads thr_entry *ti; - while(ti = thrpending.Pop()) { + while((ti = thrpending.Pop()) != NULL) { bool ok; #if FLEXT_THREADS == FLEXT_THR_POSIX |