Changeset 2881
- Timestamp:
- Nov 15, 2005, 9:30:15 AM (15 years ago)
- Location:
- trunk/ccl/lisp-kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/lisp-kernel/x86-exceptions.c
r2864 r2881 15 15 */ 16 16 17 #include "lisp.h" 18 #include "lisp-exceptions.h" 19 #include "lisp_globals.h" 20 #include <ctype.h> 21 #include <stdio.h> 22 #include <stddef.h> 23 #include <string.h> 24 #include <stdarg.h> 25 #include <errno.h> 26 #include <stdio.h> 27 #ifdef LINUX 28 #include <strings.h> 29 #include <sys/mman.h> 30 #include <fpu_control.h> 31 #include <linux/prctl.h> 32 #endif 33 34 int 35 page_size = 8192; 36 37 void 38 install_signal_handler(int signo, __sighandler_t handler) 39 { 40 struct sigaction sa; 41 42 sa.sa_sigaction = (void *)handler; 43 sigfillset(&sa.sa_mask); 44 sa.sa_flags = 45 SA_RESTART 46 | SA_SIGINFO; 47 48 sigaction(signo, &sa, NULL); 49 } 50 51 void 52 enable_fp_exceptions() 53 { 54 } 55 56 void 57 exception_init() 58 { 59 } 60 61 void 62 adjust_exception_pc(ExceptionInformation *xp, int delta) 63 { 64 xpPC(xp) += delta; 65 } 66 67 void 68 restore_soft_stack_limit(unsigned stkreg) 69 { 70 } 71 72 /* Maybe this'll work someday. We may have to do something to 73 make the thread look like it's not handling an exception */ 74 void 75 reset_lisp_process(ExceptionInformation *xp) 76 { 77 } -
trunk/ccl/lisp-kernel/x86-exceptions.h
r2858 r2881 15 15 */ 16 16 17 typedef u_int8_t opcode, *pc; 17 18 18 19 #ifdef LINUX 19 20 #ifdef X8664 20 #define xpGPRvector(x) ((natural *)(&((x)->uc_mcontext )))21 #define xpGPRvector(x) ((natural *)(&((x)->uc_mcontext.gregs))) 21 22 #define xpGPR(x,gprno) (xpGPRvector(x)[gprno]) 22 23 #define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) = (natural)(new) 23 #define xpPC(x) ((pc)(((struct sigcontext *)(&((x)->uc_mcontext)))->rip))24 #define xpPC(x) xpGPR(x,REG_RIP) 24 25 #endif 25 26 #endif
Note: See TracChangeset
for help on using the changeset viewer.