2 * This is the x86 Linux incarnation of arch-dependent OS-dependent
3 * routines. See also "linux-os.c".
7 * This software is part of the SBCL system. See the README file for
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.
17 /* These header files were lifted wholesale from linux-os.c, some may
18 * be redundant. -- Dan Barlow ca. 2001-05-01 */
20 #include <sys/param.h>
26 #include "interrupt.h"
30 #include <sys/socket.h>
31 #include <sys/utsname.h>
33 #include <sys/types.h>
35 /* #include <sys/sysinfo.h> */
41 size_t os_vm_page_size;
43 #if defined GENCGC /* unlikely ... */
47 sigcontext_register_t *
48 os_context_register_addr(os_context_t *context, int offset)
50 return &context->uc_mcontext.sc_regs[offset];
53 sigcontext_register_t *
54 os_context_fpregister_addr(os_context_t *context, int offset)
56 return &context->uc_mcontext.sc_fpregs[offset];
59 sigcontext_register_t *
60 os_context_pc_addr(os_context_t *context)
62 return &((context->uc_mcontext).sc_pc);
64 sigcontext_register_t *
65 os_context_sp_addr(os_context_t *context)
67 lose("This was supposed to be an x86-only operation");
72 os_context_sigmask_addr(os_context_t *context)
74 return &context->uc_sigmask;
77 void os_flush_icache(os_vm_address_t address, os_vm_size_t length)
79 /* XXX this really shouldn't be empty
81 <dhd> dan_b: asm volatile ("call_pal imb")
83 <dhd> also : : "memory"