X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Flinux-os.lisp;h=1e1e7868752f72db84975841c224aea9154103ca;hb=1600081cf1b71b3d0e2e40de1c1c124a3a4fd40c;hp=df6ca15791526a7237a544d0b23f34e26cede3a5;hpb=72408d179d7396904e25e9a3dc423d2634e65072;p=sbcl.git diff --git a/src/code/linux-os.lisp b/src/code/linux-os.lisp index df6ca15..1e1e786 100644 --- a/src/code/linux-os.lisp +++ b/src/code/linux-os.lisp @@ -1,4 +1,4 @@ -;;;; OS interface functions for CMU CL under Linux +;;;; OS interface functions for SBCL under Linux ;;;; This software is part of the SBCL system. See the README file for ;;;; more information. @@ -20,28 +20,20 @@ "Return a string describing the supporting software." (values "Linux")) -(defvar *software-version* nil) - +;;; FIXME: More duplicated logic here vrt. other oses. Abstract into +;;; uname-software-version? (defun software-version () #!+sb-doc "Return a string describing version of the supporting software, or NIL if not available." (or *software-version* (setf *software-version* - (string-trim '(#\newline) - (with-output-to-string (stream) - (sb!ext:run-program "/bin/uname" `("-r") - :output stream)))))) - -;;; OS-COLD-INIT-OR-REINIT initializes our operating-system interface. -;;; It sets the values of the global port variables to what they -;;; should be and calls the functions that set up the argument blocks -;;; for the server interfaces. -(defun os-cold-init-or-reinit () ; KLUDGE: don't know what to do here - #!+sparc ;; Can't use #x20000000 thru #xDFFFFFFF, but mach tries to let us. - (sb!sys:allocate-system-memory-at (sb!sys:int-sap #x20000000) #xc0000000)) + (string-trim '(#\newline) + (with-output-to-string (stream) + (sb!ext:run-program "/bin/uname" `("-r") + :output stream)))))) -;;; Return system time, user time and number of page faults. +;;; Return user time, system time, and number of page faults. (defun get-system-info () (multiple-value-bind (err? utime stime maxrss ixrss idrss isrss minflt majflt)