0.pre7.6:
[sbcl.git] / src / runtime / alpha-linux-os.c
1 /*
2  * This is the x86 Linux incarnation of arch-dependent OS-dependent
3  * routines. See also "linux-os.c".
4  */
5
6 /*
7  * This software is part of the SBCL system. See the README file for
8  * more information.
9  *
10  * This software is derived from the CMU CL system, which was
11  * written at Carnegie Mellon University and released into the
12  * public domain. The software is in the public domain and is
13  * provided with absolutely no warranty. See the COPYING and CREDITS
14  * files for more information.
15  */
16
17 /* These header files were lifted wholesale from linux-os.c, some may
18  * be redundant. -- Dan Barlow ca. 2001-05-01 */
19 #include <stdio.h>
20 #include <sys/param.h>
21 #include <sys/file.h>
22 #include "./signal.h"
23 #include "os.h"
24 #include "arch.h"
25 #include "globals.h"
26 #include "interrupt.h"
27 #include "interr.h"
28 #include "lispregs.h"
29 #include "sbcl.h"
30 #include <sys/socket.h>
31 #include <sys/utsname.h>
32
33 #include <sys/types.h>
34 #include <signal.h>
35 /* #include <sys/sysinfo.h> */
36 #include <sys/time.h>
37 #include <sys/stat.h>
38 #include <unistd.h>
39
40 #include "validate.h"
41 size_t os_vm_page_size;
42
43 #if defined GENCGC              /* unlikely ... */
44 #include "gencgc.h"
45 #endif
46
47 sigcontext_register_t   *
48 os_context_register_addr(os_context_t *context, int offset)
49 {
50     return &context->uc_mcontext.sc_regs[offset];
51 }
52
53 sigcontext_register_t *
54 os_context_fpregister_addr(os_context_t *context, int offset)
55 {
56     return &context->uc_mcontext.sc_fpregs[offset];
57 }
58
59 sigcontext_register_t *
60 os_context_pc_addr(os_context_t *context)
61 {
62     return &((context->uc_mcontext).sc_pc);
63 }
64 sigcontext_register_t *
65 os_context_sp_addr(os_context_t *context)
66 {
67     lose("This was supposed to be an x86-only operation");
68     return 0;
69 }
70
71 sigset_t *
72 os_context_sigmask_addr(os_context_t *context)
73 {
74     return &context->uc_sigmask;
75 }
76
77 void os_flush_icache(os_vm_address_t address, os_vm_size_t length)
78 {
79     /* XXX this really shouldn't be empty
80
81 <dhd> dan_b: asm volatile ("call_pal imb")
82 <dhd> or just "imb"
83 <dhd> also : : "memory" 
84
85      */
86 }