X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fos.h;h=7519f7c8a88bfc3a79e8ff5b5b2194e1a4b3ec2b;hb=a7c2a16d0c2be6709becc962be1cb5e0aeda68c6;hp=1d8e43673ec7ebb5eb773b1414e1d935d0dbe593;hpb=cea4896b2482b7b2b429c1631d774b4cfbc0efba;p=sbcl.git diff --git a/src/runtime/os.h b/src/runtime/os.h index 1d8e436..7519f7c 100644 --- a/src/runtime/os.h +++ b/src/runtime/os.h @@ -28,11 +28,6 @@ * os_vm_prot_t * type used for flags for mmap, mprotect, etc. * - * OS_VM_DEFAULT_PAGESIZE - * used by core dumping and loading logic (but dunno its exact - * definition, in particular why we can't just use getpagesize() - * instead) - * * os_vm_address_t * the type used to represent addresses? (dunno why not just void*) * os_vm_size_t, os_vm_off_t @@ -41,15 +36,9 @@ * the type used to represent context in a POSIX sigaction SA_SIGACTION * handler, i.e. the actual type of the thing pointed to by the * void* third argument of a handler */ -#if defined __FreeBSD__ -#include "bsd-os.h" -#elif defined __OpenBSD__ -#include "bsd-os.h" -#elif defined __linux__ -#include "linux-os.h" -#else -#error unsupported OS -#endif + +#include "target-os.h" + #define OS_VM_PROT_ALL \ (OS_VM_PROT_READ | OS_VM_PROT_WRITE | OS_VM_PROT_EXECUTE) @@ -113,16 +102,33 @@ extern boolean is_valid_lisp_addr(os_vm_address_t test); * register, of the specified offset, for that context. The offset is * defined in the storage class (SC) defined in the Lisp virtual * machine (i.e. the file "vm.lisp" for the appropriate architecture). */ -int *os_context_register_addr(os_context_t *context, int offset); +os_context_register_t * +os_context_register_addr(os_context_t *context, int offset); + +/* FIXME: Pending investigation, this #ifdef stays as alpha. If it + * turns out that the alpha truly requires this, it can change to + * ARCH_HAS_FLOAT_REGISTERS (currently #defined in alpha-arch.h -- CSR + * 2002-02-04 */ +#ifdef alpha +os_context_register_t * +os_context_float_register_addr(os_context_t *context, int offset); +#endif /* Given a signal context, return the address for storage of the * program counter for that context. */ -int *os_context_pc_addr(os_context_t *context); +os_context_register_t *os_context_pc_addr(os_context_t *context); +#ifdef ARCH_HAS_NPC_REGISTER +os_context_register_t *os_context_npc_addr(os_context_t *context); +#endif +#ifdef ARCH_HAS_LINK_REGISTER +os_context_register_t *os_context_lr_addr(os_context_t *context); +#endif /* Given a signal context, return the address for storage of the * system stack pointer for that context. */ -int *os_context_sp_addr(os_context_t *context); - +#ifdef ARCH_HAS_STACK_POINTER +os_context_register_t *os_context_sp_addr(os_context_t *context); +#endif /* Given a signal context, return the address for storage of the * signal mask for that context. */ sigset_t *os_context_sigmask_addr(os_context_t *context);