Initial revision
[sbcl.git] / src / runtime / linux-os.h
1 /*
2  * This software is part of the SBCL system. See the README file for
3  * more information.
4  *
5  * This software is derived from the CMU CL system, which was
6  * written at Carnegie Mellon University and released into the
7  * public domain. The software is in the public domain and is
8  * provided with absolutely no warranty. See the COPYING and CREDITS
9  * files for more information.
10  */
11
12 /*
13  * $Header$
14  */
15
16 #include <stdlib.h>
17 #include <sys/types.h>
18 #include <sys/mman.h>
19 #include <sys/signal.h>
20 #include <ucontext.h>
21 #include <string.h>
22  /* #include <dlfcn.h> */
23 #include <sys/time.h>
24 #include <sys/stat.h>
25 #include <unistd.h>
26 #include <sys/syscall.h>
27 #include <asm/unistd.h>
28 #include <linux/version.h>
29
30 #define linuxversion(a, b, c) (((a)<<16)+((b)<<8)+(c))
31
32 typedef caddr_t os_vm_address_t;
33 typedef size_t os_vm_size_t;
34 typedef off_t os_vm_offset_t;
35 typedef int os_vm_prot_t;
36
37 typedef struct ucontext os_context_t;
38
39 #define OS_VM_PROT_READ    PROT_READ
40 #define OS_VM_PROT_WRITE   PROT_WRITE
41 #define OS_VM_PROT_EXECUTE PROT_EXEC
42
43 #define OS_VM_DEFAULT_PAGESIZE  4096
44
45 #define SET_FPU_CONTROL_WORD(cw) asm("fldcw %0" : : "m" (cw))