Update of /cvsroot/pure-data/externals/grill/flext/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29935/source
Modified Files: fllib.cpp flsupport.cpp flsupport.h flthr.cpp Log Message: ""
Index: flthr.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flthr.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** flthr.cpp 27 Dec 2003 03:32:55 -0000 1.23 --- flthr.cpp 23 Aug 2004 02:33:18 -0000 1.24 *************** *** 279,283 **** // signal thread helper thrhelpcond->Signal(); ! int cnt = 0; for(int wi = 0; wi < 100; ++wi) { --- 279,286 ---- // signal thread helper thrhelpcond->Signal(); ! #if 0 ! // ###################### ! // i don't think we need to wait for a single thread to stop ! // ###################### int cnt = 0; for(int wi = 0; wi < 100; ++wi) { *************** *** 297,300 **** --- 300,305 ----
return cnt == 0; + #endif + return true; } else
Index: flsupport.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flsupport.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** flsupport.cpp 11 Aug 2004 04:04:25 -0000 1.38 --- flsupport.cpp 23 Aug 2004 02:33:17 -0000 1.39 *************** *** 81,124 ****
#ifdef FLEXT_THREADS - - #if FLEXT_SYS == FLEXT_SYS_MAX && FLEXT_OS == FLEXT_OS_MAC && FLEXT_THREADS == FLEXT_THR_POSIX - // for Max OSX/CFM MachO functions have to be imported - CFBundleRef bundle = NULL; - if (bundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.Carbon"))) - { - //load pthread function pointers - pthread_self = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_self")); - pthread_equal = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_equal")); - pthread_create = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_create")); - pthread_cancel = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_cancel")); - pthread_testcancel = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_testcancel")); - pthread_join = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_join")); - pthread_exit = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_exit")); - - pthread_attr_init = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_attr_init")); - pthread_attr_destroy = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_attr_destroy")); - pthread_attr_setdetachstate = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_attr_setdetachstate")); - - pthread_attr_getschedparam = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_attr_getschedparam")); - pthread_attr_setschedparam = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_attr_setschedparam")); - - pthread_mutex_init = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_mutex_init")); - pthread_mutex_destroy = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_mutex_destroy")); - pthread_mutex_lock = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_mutex_lock")); - pthread_mutex_unlock = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_mutex_unlock")); - pthread_mutex_trylock = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_mutex_trylock")); - - pthread_cond_init = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_cond_init")); - pthread_cond_destroy = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_cond_destroy")); - pthread_cond_signal = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_cond_signal")); - pthread_cond_wait = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_cond_wait")); - pthread_cond_timedwait = CFBundleGetFunctionPointerForName(bundle, CFSTR("pthread_cond_timedwait")); - - sched_yield = CFBundleGetFunctionPointerForName(bundle, CFSTR("sched_yield")); - sched_get_priority_min = CFBundleGetFunctionPointerForName(bundle, CFSTR("sched_get_priority_min")); - sched_get_priority_max = CFBundleGetFunctionPointerForName(bundle, CFSTR("sched_get_priority_max")); - } - #endif - thrid = GetThreadId(); StartHelper(); --- 81,84 ----
Index: flsupport.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flsupport.h,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** flsupport.h 21 Jun 2004 13:58:19 -0000 1.69 --- flsupport.h 23 Aug 2004 02:33:17 -0000 1.70 *************** *** 648,686 **** */
- #if FLEXT_SYS == FLEXT_SYS_MAX && FLEXT_OS == FLEXT_OS_MAC && FLEXT_THREADS == FLEXT_THR_POSIX - // These are function pointers of MachO functions imported to the CFM world - - static pthread_t (*pthread_self)(); - static int (*pthread_equal)(pthread_t,pthread_t); - static int (*pthread_create)(pthread_t *,const pthread_attr_t *,void *(*)(void *),void *); - static int (*pthread_cancel)(pthread_t); - static void (*pthread_testcancel)(void); - static int (*pthread_join)(pthread_t,void **); - static void (*pthread_exit)(void *); - - static int (*pthread_attr_init)(pthread_attr_t *); - static int (*pthread_attr_destroy)(pthread_attr_t *); - static int (*pthread_attr_setdetachstate)(pthread_attr_t *,int); - - static int (*pthread_getschedparam)(pthread_t,int *,struct sched_param *); - static int (*pthread_setschedparam)(pthread_t,int,const struct sched_param *); - - static int (*pthread_mutex_init)(pthread_mutex_t *,const pthread_mutexattr_t *); - static int (*pthread_mutex_destroy)(pthread_mutex_t *); - static int (*pthread_mutex_lock)(pthread_mutex_t *); - static int (*pthread_mutex_unlock)(pthread_mutex_t *); - static int (*pthread_mutex_trylock)(pthread_mutex_t *); - - static int (*pthread_cond_init)(pthread_cond_t *,const pthread_condattr_t *); - static int (*pthread_cond_destroy)(pthread_cond_t *); - static int (*pthread_cond_signal)(pthread_cond_t *); - static int (*pthread_cond_wait)(pthread_cond_t *,pthread_mutex_t *); - static int (*pthread_cond_timedwait)(pthread_cond_t *,pthread_mutex_t *,const struct timespec *); - - static int (*sched_yield)(void); - static int (*sched_get_priority_min)(int); - static int (*sched_get_priority_max)(int); - #endif - //! thread type #if FLEXT_THREADS == FLEXT_THR_MP --- 648,651 ---- *************** *** 1011,1014 **** --- 976,980 ---- \return True if at least one matching thread has been found. \remark Terminates all running threads with matching meth and params. + \note Function doesn NOT wait for termination */ static bool StopThread(void (*meth)(thr_params *p),thr_params *params = NULL,bool wait = false);
Index: fllib.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/fllib.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** fllib.cpp 22 Jun 2004 02:33:26 -0000 1.26 --- fllib.cpp 23 Aug 2004 02:33:17 -0000 1.27 *************** *** 176,183 **** } catch(std::exception &x) { ! error("%s - Exception at library setup: %s",name,x.what()); } catch(char *txt) { ! error("%s - Exception at library setup: %s",name,txt); } catch(...) { --- 176,183 ---- } catch(std::exception &x) { ! error("%s - %s",name,x.what()); } catch(char *txt) { ! error("%s - %s",name,txt); } catch(...) {