Ignore:
Timestamp:
05/09/06 05:56:05 (18 years ago)
Author:
rchin
Message:
  • Updated to new mach_inject with support for x86
  • Updated nib files to 10.2+ format so that future updates to the f-script framework won't break fsa
  • Adjusted some code to work with the new x86 mach_inject (sends an additional argument)
  • Updates code to work with newer defines in cctools
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cocoa/F-Script Anywhere/Source/SCPatch/SCPatchController/SCPatchLoader.c

    r153 r217  
    199199
    200200//-------------------------------------------------------------------------------------------------------------
    201 mach_error_t INJECT_ENTRY( ptrdiff_t codeOffset, void *paramBlock, size_t paramSize )
     201mach_error_t INJECT_ENTRY( ptrdiff_t codeOffset, void *paramBlock, size_t paramSize, char *dummy_pthread_struct )
    202202{
    203203        pthread_t                       thread;
     
    205205        struct sched_param      sched;
    206206        int                                     policy;
    207        
     207#if defined (__i386__)
     208        // On intel, per-pthread data is a zone of data that must be allocated.
     209        // if not, all function trying to access per-pthread data (all mig functions for instance)
     210        // will crash.
     211        extern void __pthread_set_self(char*);
     212        __pthread_set_self(dummy_pthread_struct);
     213#endif
    208214    // We need to fix up function addresses in gcc code, but not for code generated by CW.
    209 #ifdef __MWERKS__
     215        // It turns out that this is not needed for gcc 4.0
     216//#ifdef __MWERKS__
    210217    codeOffset = 0;
    211 #endif
     218//#endif
    212219    // Stash the code offset where we can get at it later.
    213220    ((SCPatchLoaderParams *)paramBlock)->codeOffset = codeOffset;
Note: See TracChangeset for help on using the changeset viewer.