X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fruntime%2Fcoreparse.c;h=240c8c89266836b117d27766a45329aa2b070969;hb=79bc50a7798a9fdb92d0c6e233f8f5282539649b;hp=3109b0bc50eec7b78f2e1da5846bb7a0250cd7b4;hpb=4aad6e46b8b15dc409b80dc720e3372d39023b4b;p=sbcl.git diff --git a/src/runtime/coreparse.c b/src/runtime/coreparse.c index 3109b0b..240c8c8 100644 --- a/src/runtime/coreparse.c +++ b/src/runtime/coreparse.c @@ -23,6 +23,8 @@ #include #include +#include "sbcl.h" + #ifndef LISP_FEATURE_WIN32 #ifdef LISP_FEATURE_LINUX /* For madvise */ @@ -31,7 +33,6 @@ #include #endif -#include "sbcl.h" #include "os.h" #include "runtime.h" #include "globals.h" @@ -42,12 +43,7 @@ #include "validate.h" #include "gc-internal.h" - -/* lutex stuff */ -#if defined(LISP_FEATURE_SB_THREAD) && defined(LISP_FEATURE_SB_LUTEX) -#include "genesis/sap.h" -#include "pthread-lutex.h" -#endif +#include "runtime-options.h" #include @@ -73,10 +69,10 @@ open_binary(char *filename, int mode) static struct runtime_options * read_runtime_options(int fd) { - size_t optarray[RUNTIME_OPTIONS_WORDS]; + os_vm_size_t optarray[RUNTIME_OPTIONS_WORDS]; struct runtime_options *options = NULL; - if (read(fd, optarray, RUNTIME_OPTIONS_WORDS * sizeof(size_t)) != + if (read(fd, optarray, RUNTIME_OPTIONS_WORDS * sizeof(os_vm_size_t)) != RUNTIME_OPTIONS_WORDS * sizeof(size_t)) { return NULL; } @@ -489,47 +485,12 @@ load_core_file(char *file, os_vm_offset_t file_offset) initial_function = (lispobj)*ptr; break; -#if defined(LISP_FEATURE_SB_THREAD) && defined(LISP_FEATURE_SB_LUTEX) - case LUTEX_TABLE_CORE_ENTRY_TYPE_CODE: - SHOW("LUTEX_TABLE_CORE_ENTRY_TYPE_CODE case"); - { - size_t n_lutexes = *ptr; - size_t fdoffset = (*(ptr + 1) + 1) * (os_vm_page_size); - size_t data_length = n_lutexes * sizeof(struct sap *); - struct lutex **lutexes_to_resurrect = malloc(data_length); - long bytes_read; - - lseek(fd, fdoffset + file_offset, SEEK_SET); - - FSHOW((stderr, "attempting to read %ld lutexes from core\n", n_lutexes)); - bytes_read = read(fd, lutexes_to_resurrect, data_length); - - /* XXX */ - if (bytes_read != data_length) { - lose("Could not read the lutex table"); - } - else { - int i; - - for (i=0; i