Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/runtime/mach-dep/signal-sysdep.h
ViewVC logotype

Diff of /sml/trunk/runtime/mach-dep/signal-sysdep.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3431, Sun Sep 13 17:10:57 2009 UTC revision 3432, Sun Sep 13 17:50:53 2009 UTC
# Line 68  Line 68 
68  #endif  #endif
69    
70  #if defined(HAS_UCONTEXT)  #if defined(HAS_UCONTEXT)
71    #ifdef __APPLE__
72    #  include <sys/ucontext.h>
73    #else
74  #include <ucontext.h>  #include <ucontext.h>
75    #endif
76  #ifdef INCLUDE_SIGINFO_H  #ifdef INCLUDE_SIGINFO_H
77  #  include INCLUDE_SIGINFO_H  #  include INCLUDE_SIGINFO_H
78  #endif  #endif
# Line 516  Line 520 
520  /* NOTE: MacOS X 10.4.7 sets the code to 0, so we need to test the opcode. */  /* NOTE: MacOS X 10.4.7 sets the code to 0, so we need to test the opcode. */
521  #    define INTO_OPCODE         0xce    /* the 'into' instruction is a single */  #    define INTO_OPCODE         0xce    /* the 'into' instruction is a single */
522                                          /* instruction that signals Overflow */                                          /* instruction that signals Overflow */
523  #    define INT_DIVZERO(s, c)   (((s) == SIGFPE) && ((c) == FPE_FLTDIV))  /* NOTE: In 10.6, Apple finally got it right, but earlier versions either used the
524  #    define INT_OVFLW(s, c)     (((s) == SIGFPE) && ((c) == FPE_FLTOVF))   * FPE_FLT* codes are set the code to zero.
525     */
526    #    define INT_DIVZERO(s, c)   (((s) == SIGFPE) && (((c) == FPE_INTDIV) || ((c) == FPE_FLTDIV)))
527    #    define INT_OVFLW(s, c)     (((s) == SIGFPE) && (((c) == FPE_INTOVF) || ((c) == FPE_FLTOVF)))
528      /* see /usr/include/mach/i386/thread_status.h */      /* see /usr/include/mach/i386/thread_status.h */
529  #    define SIG_GetCode(info,scp)       ((info)->si_code)  #    define SIG_GetCode(info,scp)       ((info)->si_code)
530    #    if ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ - 1040) <= 0)
531          /* Tiger */
532  #    define SIG_GetPC(scp)              ((scp)->uc_mcontext->ss.eip)  #    define SIG_GetPC(scp)              ((scp)->uc_mcontext->ss.eip)
533  #    define SIG_SetPC(scp, addr)        { (scp)->uc_mcontext->ss.eip = (int) addr; }  #    define SIG_SetPC(scp, addr)        { (scp)->uc_mcontext->ss.eip = (int) addr; }
534    #    else
535         /* Leopard or later */
536    #      define SIG_GetPC(scp)            ((scp)->uc_mcontext->__ss.__eip)
537    #      define SIG_SetPC(scp, addr)      { (scp)->uc_mcontext->__ss.__eip = (int) addr; }
538    #    endif
539  #    define SIG_ZeroLimitPtr(scp)       { ML_X86Frame[LIMITPTR_X86OFFSET] = 0; }  #    define SIG_ZeroLimitPtr(scp)       { ML_X86Frame[LIMITPTR_X86OFFSET] = 0; }
540    
541  #  else  #  else

Legend:
Removed from v.3431  
changed lines
  Added in v.3432

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0