2 * This is the HPPA 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.
18 #include <sys/param.h>
24 #include "interrupt.h"
28 #include <sys/socket.h>
29 #include <sys/utsname.h>
31 #include <sys/types.h>
38 size_t os_vm_page_size;
40 #ifdef LISP_FEATURE_SB_THREAD
41 #error "Define threading support functions"
43 struct thread *arch_os_get_current_thread() {
46 int arch_os_thread_init(struct thread *thread) {
47 return 1; /* success */
49 int arch_os_thread_cleanup(struct thread *thread) {
50 return 1; /* success */
54 os_context_register_t *
55 os_context_register_addr(os_context_t *context, int offset)
58 /* KLUDGE: I'm not sure, but it's possible that Linux puts the
59 contents of the Processor Status Word in the (wired-zero)
60 slot in the mcontext. In any case, the following is
61 unlikely to do any harm: */
66 return &(((struct sigcontext *) &(context->uc_mcontext))->sc_gr[offset]);
70 os_context_register_t *
71 os_context_pc_addr(os_context_t *context)
73 /* Why do I get all the silly ports? -- CSR, 2002-08-11 */
74 return &(((struct sigcontext *) &(context->uc_mcontext))->sc_iaoq[0]);
77 os_context_register_t *
78 os_context_npc_addr(os_context_t *context)
80 return &(((struct sigcontext *) &(context->uc_mcontext))->sc_iaoq[1]);
84 os_context_sigmask_addr(os_context_t *context)
86 return &(context->uc_sigmask);
90 os_restore_fp_control(os_context_t *context)
92 /* FIXME: Probably do something. */
96 os_flush_icache(os_vm_address_t address, os_vm_size_t length)
98 /* FIXME: Maybe this is OK. */
99 sanctify_for_execution(address,length);