Changeset 5298
- Timestamp:
- Oct 5, 2006, 1:46:06 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ccl/lisp-kernel/x86-exceptions.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/lisp-kernel/x86-exceptions.c
r5287 r5298 372 372 373 373 374 extern unsigned get_mxcsr(); 375 extern void set_mxcsr(unsigned); 374 376 375 377 int … … 380 382 natural callback_ptr, i; 381 383 int delta; 384 unsigned old_mxcsr = get_mxcsr(); 385 386 set_mxcsr(0x1f80); 382 387 383 388 /* Put the active stack pointers where .SPcallback expects them */ … … 393 398 delta = ((int (*)())callback_ptr) (xp, arg1, arg2, arg3, arg4, arg5); 394 399 LOCK(lisp_global(EXCEPTION_LOCK), tcr); 400 set_mxcsr(old_mxcsr); 395 401 return delta; 396 402 } … … 832 838 833 839 void 834 signal_handler(int signum, siginfo_t *info, ExceptionInformation *context, TCR *tcr )840 signal_handler(int signum, siginfo_t *info, ExceptionInformation *context, TCR *tcr, int old_valence) 835 841 { 836 842 #ifdef DARWIN_GS_HACK … … 838 844 #endif 839 845 xframe_list xframe_link; 840 int old_valence;841 846 #ifndef DARWIN 842 847 tcr = get_tcr(false); … … 857 862 } 858 863 unlock_exception_lock_in_handler(tcr); 859 #ifndef DARWIN860 864 exit_signal_handler(tcr, old_valence); 861 #endif862 865 /* raise_pending_interrupt(tcr); */ 863 866 #ifdef DARWIN_GS_HACK … … 866 869 } 867 870 #endif 868 #ifndef DARWIN869 871 SIGRETURN(context); 870 #endif871 872 } 872 873 873 874 #ifdef DARWIN 874 #endif 875 void 876 pseudo_signal_handler(int signum, siginfo_t *info, ExceptionInformation *context, TCR *tcr, int old_valence) 877 { 878 sigset_t mask; 879 880 sigfillset(&mask); 881 882 pthread_sigmask(SIG_SETMASK,&mask,&(context->uc_sigmask)); 883 signal_handler(signum, info, context, tcr, old_valence); 884 } 885 #endif 886 887 875 888 876 889 #ifdef LINUX … … 1886 1899 #endif 1887 1900 ExceptionInformation *pseudosigcontext; 1888 int i, j ;1901 int i, j, old_valence = tcr->valence; 1889 1902 kern_return_t result; 1890 1903 natural stackp, *stackpp; … … 1919 1932 new_ts.__rdx = (natural)pseudosigcontext; 1920 1933 new_ts.__rcx = (natural)tcr; 1934 new_ts.__r8 = (natural)old_valence; 1921 1935 new_ts.__rsp = stackp; 1936 new_ts.__rflags = ts->__rflags; 1922 1937 1923 1938 … … 2053 2068 if (signum) { 2054 2069 kret = setup_signal_frame(thread, 2055 (void *) signal_handler,2070 (void *)pseudo_signal_handler, 2056 2071 signum, 2057 2072 code,
Note:
See TracChangeset
for help on using the changeset viewer.
