From 216da4973fc523fc207d5d0f5986da227e7e6665 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Wed, 6 Jul 2005 16:08:20 +0000 Subject: 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 --- externals/grill/flext/source/flthr.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'externals/grill/flext/source/flthr.cpp') 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 -#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 #include #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 -- cgit v1.2.1