xref: /inferno-os/MacOSX/386/include/emu.h (revision e57c7e16a3789cd4de1a3c2560d49b1ee39cd10a)
1 /*
2  * system- and machine-specific declarations for emu:
3  * floating-point save and restore, signal handling primitive, and
4  * implementation of the current-process variable `up'.
5  */
6 
7 extern Proc *getup(void);
8 #define	up	(getup())
9 
10 /*
11  * This structure must agree with FPsave and FPrestore asm routines
12  */
13 
14 // something is at odds between i386/fpu.h and some of the thread headers
15 #define fp_control inffp_control
16 #define fp_control_t inffp_control_t
17 #define fp_status inffp_status
18 #define fp_status_t inffp_status_t
19 
20 #include <architecture/i386/fpu.h>
21 
22 typedef struct FPU FPU;
23 struct FPU
24 {
25 	fp_state_t	env;
26 };
27 
28 #undef fp_control
29 #undef fp_control_t
30 #undef fp_status
31 #undef fp_status_t
32 
33 typedef sigjmp_buf osjmpbuf;
34 #define	ossetjmp(buf)	sigsetjmp(buf, 1)
35