Update of /cvsroot/pure-data/externals/grill/flext/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11329/source
Modified Files: flattr.cpp flprefix.h flstdc.h flthr.cpp Log Message: ""
Index: flprefix.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flprefix.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** flprefix.h 21 Jun 2004 13:58:19 -0000 1.28 --- flprefix.h 24 Aug 2004 02:34:30 -0000 1.29 *************** *** 341,346 **** #ifdef FLEXT_THREADS #undef FLEXT_THREADS ! #if FLEXT_OS == FLEXT_OS_MAC && FLEXT_SYS == FLEXT_SYS_MAX ! // Max crashes with posix threads (because it's in the CFM model) #define FLEXT_THREADS FLEXT_THR_MP #elif FLEXT_SYS == FLEXT_SYS_MAX && FLEXT_OS == FLEXT_OS_WIN --- 341,346 ---- #ifdef FLEXT_THREADS #undef FLEXT_THREADS ! #if FLEXT_SYS == FLEXT_SYS_MAX && FLEXT_OS == FLEXT_OS_MAC && FLEXT_OSAPI != FLEXT_OSAPI_MAC_MACH ! // Max for CFM doesn't like posix threads #define FLEXT_THREADS FLEXT_THR_MP #elif FLEXT_SYS == FLEXT_SYS_MAX && FLEXT_OS == FLEXT_OS_WIN
Index: flattr.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flattr.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** flattr.cpp 20 Apr 2004 02:33:04 -0000 1.23 --- flattr.cpp 24 Aug 2004 02:34:30 -0000 1.24 *************** *** 170,174 **** bool flext_base::ListAttrib() const { ! if(procattr) { AtomList la; ListAttrib(la); --- 170,174 ---- bool flext_base::ListAttrib() const { ! if(procattr) { AtomList la; ListAttrib(la);
Index: flthr.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flthr.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** flthr.cpp 23 Aug 2004 02:33:18 -0000 1.24 --- flthr.cpp 24 Aug 2004 02:34:30 -0000 1.25 *************** *** 51,77 ****
- #if defined(FLEXT_THREADS) && FLEXT_SYS == FLEXT_SYS_MAX && FLEXT_OS == FLEXT_OS_MAC && FLEXT_THREADS == FLEXT_THR_POSIX - // utility code taken from from Apple's CFM_MachO_CFM example: - // - // This function allocates a block of CFM glue code which contains the instructions to call CFM routines - // - (void (*)(void *))MachOFunctionPointerForCFMFunctionPointer( (void (*)(void *))cfmfp ) - { - // Apple utility code for CFM callback glue - static const UInt32 tmpl[6] = {0x3D800000, 0x618C0000, 0x800C0000, 0x804C0004, 0x7C0903A6, 0x4E800420}; - UInt32 *mfp = (UInt32*) NewPtr( sizeof(tmpl) ); // Must later dispose of allocated memory - // (this is freed with app heap in this object) - mfp[0] = tmpl[0] | ((UInt32)cfmfp >> 16); - mfp[1] = tmpl[1] | ((UInt32)cfmfp & 0xFFFF); - mfp[2] = tmpl[2]; - mfp[3] = tmpl[3]; - mfp[4] = tmpl[4]; - mfp[5] = tmpl[5]; - MakeDataExecutable( mfp, sizeof(tmpl) ); - return (void (*)(void *))mfp; - } - #endif - - flext::thrid_t flext::GetSysThreadId() { return thrid; }
--- 51,54 ---- *************** *** 101,111 ****
thrhelpexit = false; ! #if FLEXT_SYS == FLEXT_SYS_MAX && FLEXT_OS == FLEXT_OS_MAC ! void (*CFMThrHelper)(void *) = MachOFunctionPointerForCFMFunctionPointer(ThrHelper); ! int ret = pthread_create (&thrhelpid,&attr,(void *(*)(void *))CFMThrHelper,NULL); ! #else ! int ret = pthread_create (&thrhelpid,&attr,(void *(*)(void *))ThrHelper,NULL); ! #endif ! ok = !ret; #elif FLEXT_THREADS == FLEXT_THR_MP if(!MPLibraryIsLoaded()) --- 78,82 ----
thrhelpexit = false; ! ok = pthread_create (&thrhelpid,&attr,(void *(*)(void *))ThrHelper,NULL) == 0; #elif FLEXT_THREADS == FLEXT_THR_MP if(!MPLibraryIsLoaded())
Index: flstdc.h =================================================================== RCS file: /cvsroot/pure-data/externals/grill/flext/source/flstdc.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** flstdc.h 11 Aug 2004 04:04:25 -0000 1.25 --- flstdc.h 24 Aug 2004 02:34:30 -0000 1.26 *************** *** 97,106 ****
#if FLEXT_OS == FLEXT_OS_MAC ! #ifndef __MRC__ ! #define powerc ! #endif ! #define __MOTO__ 0
! #include <MacTypes.h> #elif FLEXT_OS == FLEXT_OS_WIN #define WIN_VERSION 1 --- 97,112 ----
#if FLEXT_OS == FLEXT_OS_MAC ! #if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH ! // MachO version - must insert prefix header ! #include <ext_carbon_prefix.h> ! #else ! // CFM version ! #ifndef __MRC__ ! #define powerc ! #endif ! #define __MOTO__ 0
! #include <MacTypes.h> ! #endif #elif FLEXT_OS == FLEXT_OS_WIN #define WIN_VERSION 1