82d979ad6085d1d6797e83e82dff3745c4038d8d
[sbcl.git] / src / runtime / alpha-linux-os.c
1 /*
2  * The x86 Linux incarnation of arch-dependent OS-dependent routines.
3  * See also linux-os.c
4  */
5
6
7 /* header files lifted wholesale from linux-os.c, some may be redundant */
8
9 #include <stdio.h>
10 #include <sys/param.h>
11 #include <sys/file.h>
12 #include "./signal.h"
13 #include "os.h"
14 #include "arch.h"
15 #include "globals.h"
16 #include "interrupt.h"
17 #include "interr.h"
18 #include "lispregs.h"
19 #include "sbcl.h"
20 #include <sys/socket.h>
21 #include <sys/utsname.h>
22
23 #include <sys/types.h>
24 #include <signal.h>
25 /* #include <sys/sysinfo.h> */
26 #include <sys/time.h>
27 #include <sys/stat.h>
28 #include <unistd.h>
29
30 #include "validate.h"
31 size_t os_vm_page_size;
32
33 #if defined GENCGC              /* unlikely ... */
34 #include "gencgc.h"
35 #endif
36
37 sigcontext_register_t   *
38 os_context_register_addr(os_context_t *context, int offset)
39 {
40     return &context->uc_mcontext.sc_regs[offset];
41 }
42
43 sigcontext_register_t *
44 os_context_fpregister_addr(os_context_t *context, int offset)
45 {
46     return &context->uc_mcontext.sc_fpregs[offset];
47 }
48
49 sigcontext_register_t *
50 os_context_pc_addr(os_context_t *context)
51 {
52     return &((context->uc_mcontext).sc_pc);
53 }
54 sigcontext_register_t *
55 os_context_sp_addr(os_context_t *context)
56 {
57     lose("This was supposed to be an x86-only operation");
58     return 0;
59 }
60
61 sigset_t *
62 os_context_sigmask_addr(os_context_t *context)
63 {
64     return &context->uc_sigmask;
65 }
66
67 void os_flush_icache(os_vm_address_t address, os_vm_size_t length)
68 {
69     /* XXX this really shouldn't be empty
70
71 <dhd> dan_b: asm volatile ("call_pal imb")
72 <dhd> or just "imb"
73 <dhd> also : : "memory" 
74
75      */
76 }