Changeset 5622
- Timestamp:
- Dec 14, 2006, 6:47:14 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ccl/lisp-kernel/ppc-exceptions.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/lisp-kernel/ppc-exceptions.c
r5542 r5622 38 38 #define SA_NODEFER 0 39 39 #endif 40 #include <sysexits.h> 40 41 41 42 /* a distinguished UUO at a distinguished address */ … … 656 657 } 657 658 659 TCR *gc_tcr = NULL; 660 658 661 /* Suspend and "normalize" other tcrs, then call a gc-like function 659 662 in that context. Resume the other tcrs, then return what the … … 679 682 return 0; 680 683 } 684 685 gc_tcr = tcr; 681 686 682 687 xpGPR(xp, allocptr) = VOID_ALLOCPTR; … … 709 714 other_tcr = other_tcr->next; 710 715 } while (other_tcr != tcr); 716 717 gc_tcr = NULL; 711 718 712 719 resume_other_threads(true); … … 1359 1366 tcr->save_tsp = (LispObj*) ptr_from_lispobj(xpGPR(xp, tsp)); 1360 1367 1361 tcr->lisp_fpscr.words.l = 0xd0;1362 enable_fp_exceptions();1363 1368 1364 1369 … … 2095 2100 2096 2101 void 2102 quit_handler(int signum, siginfo_t info, ExceptionInformation *xp) 2103 { 2104 TCR *tcr = get_tcr(false); 2105 area *a; 2106 sigset_t mask; 2107 2108 sigemptyset(&mask); 2109 2110 if (tcr) { 2111 tcr->valence = TCR_STATE_FOREIGN; 2112 a = tcr->vs_area; 2113 if (a) { 2114 a->active = a->high; 2115 } 2116 a = tcr->ts_area; 2117 if (a) { 2118 a->active = a->high; 2119 } 2120 a = tcr->cs_area; 2121 if (a) { 2122 a->active = a->high; 2123 } 2124 } 2125 2126 pthread_sigmask(SIG_SETMASK,&mask,NULL); 2127 pthread_exit(NULL); 2128 } 2129 2130 void 2097 2131 thread_signal_setup() 2098 2132 { … … 2102 2136 install_signal_handler(thread_suspend_signal, (void *) suspend_resume_handler); 2103 2137 install_signal_handler(thread_resume_signal, (void *) suspend_resume_handler); 2138 install_signal_handler(SIGQUIT, (void *)quit_handler); 2104 2139 } 2105 2140 … … 2672 2707 #endif 2673 2708 kret = 0; 2709 if (tcr == gc_tcr) { 2710 int i; 2711 write(1, "exception in GC thread. Sleeping for 60 seconds\n",sizeof("exception in GC thread. Sleeping for 60 seconds\n")); 2712 for (i = 0; i < 60; i++) { 2713 sleep(1); 2714 } 2715 _exit(EX_SOFTWARE); 2716 } 2674 2717 } 2675 2718 return kret;
Note:
See TracChangeset
for help on using the changeset viewer.
