X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fos.h;h=3cf3f2d13f0df44e21e612420fc05904d4c90375;hb=e4542bc034db18cf98f005b2dac53a6d7d5c7260;hp=b3c313db7a592b13f0d31b9fb90fe3d11bd858ef;hpb=68fd2d2dd6f265669a8957accd8a33e62786a97e;p=sbcl.git diff --git a/src/runtime/os.h b/src/runtime/os.h index b3c313d..3cf3f2d 100644 --- a/src/runtime/os.h +++ b/src/runtime/os.h @@ -17,6 +17,7 @@ #define _OS_H_INCLUDED_ +#include "sbcl.h" #include "runtime.h" /* Some standard preprocessor definitions and typedefs are needed from @@ -37,29 +38,19 @@ * 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) +#define OS_VM_PROT_NONE 0 + extern os_vm_size_t os_vm_page_size; /* Do anything we need to do when starting up the runtime environment * in this OS. */ -extern void os_init(void); +extern void os_init(char *argv[], char *envp[]); /* Install any OS-dependent low-level signal handlers which are needed * by the runtime environment. E.g. the signals raised by a violation @@ -90,9 +81,9 @@ extern void os_invalidate(os_vm_address_t addr, os_vm_size_t len); /* This maps a file into memory, or calls lose(..) for various * failures. */ extern os_vm_address_t os_map(int fd, - int offset, - os_vm_address_t addr, - os_vm_size_t len); + int offset, + os_vm_address_t addr, + os_vm_size_t len); /* This presumably flushes the instruction cache, if that can be done * explicitly. (It doesn't seem to be an issue for the i386 port, @@ -104,8 +95,8 @@ extern void os_flush_icache(os_vm_address_t addr, os_vm_size_t len); * write-protecting a page so that the garbage collector can find out * whether it's modified by handling the signal. */ extern void os_protect(os_vm_address_t addr, - os_vm_size_t len, - os_vm_prot_t protection); + os_vm_size_t len, + os_vm_prot_t protection); /* This returns true for an address which makes sense at the Lisp level. */ extern boolean is_valid_lisp_addr(os_vm_address_t test); @@ -121,7 +112,7 @@ os_context_register_addr(os_context_t *context, int offset); * 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 +#ifdef LISP_FEATURE_ALPHA os_context_register_t * os_context_float_register_addr(os_context_t *context, int offset); #endif @@ -149,7 +140,7 @@ sigset_t *os_context_sigmask_addr(os_context_t *context); * depend not only on the OS, but also on the architecture, e.g. * getting at EFL/EFLAGS on the x86. Such things are defined in the * architecture-dependence files, not the OS-dependence files.) */ - + /* These are not architecture-specific functions, but are instead * general utilities defined in terms of the architecture-specific * function os_validate(..) and os_invalidate(..). @@ -159,8 +150,8 @@ sigset_t *os_context_sigmask_addr(os_context_t *context); extern os_vm_address_t os_allocate(os_vm_size_t len); extern os_vm_address_t os_allocate_at(os_vm_address_t addr, os_vm_size_t len); extern os_vm_address_t os_reallocate(os_vm_address_t addr, - os_vm_size_t old_len, - os_vm_size_t len); + os_vm_size_t old_len, + os_vm_size_t len); extern void os_deallocate(os_vm_address_t addr, os_vm_size_t len);