X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Flinux-os.c;h=345ff482ba3941479cd798b4b909ba602f07eb48;hb=40588bcc85ce25d24d59becf96576cc7c89a3c95;hp=778f72cb2bc348eaf0bc74b1321d4c1f07f2223e;hpb=b27fb452f72190637b03a6ef2e1333091da42a98;p=sbcl.git diff --git a/src/runtime/linux-os.c b/src/runtime/linux-os.c index 778f72c..345ff48 100644 --- a/src/runtime/linux-os.c +++ b/src/runtime/linux-os.c @@ -208,6 +208,10 @@ os_init(char *argv[], char *envp[]) fprintf(stderr, "WARNING: Couldn't re-execute SBCL with the proper personality flags (maybe /proc isn't mounted?). Trying to continue anyway.\n"); } } + /* Use SSE detector. Recent versions of Linux enable SSE support + * on SSE capable CPUs. */ + /* FIXME: Are there any old versions that does not support SSE? */ + fast_bzero_pointer = fast_bzero_detect; #endif } @@ -366,3 +370,18 @@ os_install_interrupt_handlers(void) sig_stop_for_gc_handler); #endif } + +char * +os_get_runtime_executable_path() +{ + char path[PATH_MAX + 1]; + int size; + + size = readlink("/proc/self/exe", path, sizeof(path)-1); + if (size < 0) + return NULL; + else + path[size] = '\0'; + + return copied_string(path); +}