Ignore:
Timestamp:
Oct 1, 2012, 10:30:32 AM (8 years ago)
Author:
gb
Message:

Try to minimize Mach dependencies on Darwin; in particular, use POSIX
signal handling to handle exceptions (as is done on other *nix platforms.)

Use sigaltstack() on Darwin; it still seems to have problems, but at least
doesn't (usually) try to force all threads to use the same alt stack. (That
just never gets old somehow ...)

Lots of stuff removed; lots of (mostly small, mostly obvious) changes to
support the above.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/pmcl-kernel.c

    r15452 r15470  
    7777#endif
    7878
    79 Boolean use_mach_exception_handling =
    80 #ifdef DARWIN
    81   true
    82 #else
    83   false
    84 #endif
    85 ;
    8679
    8780#ifdef DARWIN
     
    9083#include <sys/mman.h>
    9184#include <sys/resource.h>
    92 #include <mach/mach_types.h>
    93 #include <mach/message.h>
    94 #include <mach/vm_region.h>
    95 #include <mach/port.h>
    9685#include <sys/sysctl.h>
    9786#undef undefined
     
    23592348  int result = -1;
    23602349  TCR *tcr = get_tcr(1);
    2361 #ifdef DARWIN
    2362   extern kern_return_t tcr_establish_lisp_exception_port(TCR *);
    2363 #endif
    23642350 
    23652351  result = f(arg0,arg1,arg2);
    2366 #ifdef DARWIN
    2367   tcr_establish_lisp_exception_port(tcr);
    2368 #endif
    23692352  return result;
    23702353}
Note: See TracChangeset for help on using the changeset viewer.