X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fwin32-os.lisp;h=ea085e5eca1c2d546511035af8a1a9c88cd4a1bc;hb=230707c1899c1c008f7ce2ad97e2fd04849f7443;hp=15658978bf001040a0cbff4a950b753a452001cf;hpb=7fb597b585fc715537ea644f7d84440eca217ca1;p=sbcl.git diff --git a/src/code/win32-os.lisp b/src/code/win32-os.lisp index 1565897..ea085e5 100644 --- a/src/code/win32-os.lisp +++ b/src/code/win32-os.lisp @@ -20,42 +20,20 @@ "Return a string describing the supporting software." (values "Win32")) -(defvar *software-version* nil) - (defun software-version () #!+sb-doc "Return a string describing version of the supporting software, or NIL if not available." - nil ;; FIXME: Implement. - #+nil(or *software-version* - (setf *software-version* - (string-trim '(#\newline) - (with-output-to-string (stream) - (sb!ext:run-program "/bin/uname" `("-r") - :output stream)))))) - -(defun os-cold-init-or-reinit () ; KLUDGE: don't know what to do here - (/show0 "entering win32-os.lisp OS-COLD-INIT-OR-REINIT") - (setf *software-version* nil) - (/show0 "setting *DEFAULT-PATHNAME-DEFAULTS*") - (setf *default-pathname-defaults* - ;; (temporary value, so that #'NATIVE-PATHNAME won't blow up when - ;; we call it below:) - (make-trivial-default-pathname) - *default-pathname-defaults* - ;; (final value, constructed using #'NATIVE-PATHNAME:) - (native-pathname (sb!unix:posix-getcwd/))) - (/show0 "leaving linux-os.lisp OS-COLD-INIT-OR-REINIT")) + ;; FIXME: Implement. + nil) -;;; Return system time, user time and number of page faults. +;;; Return user time, system time, and number of page faults. (defun get-system-info () -#+nil (multiple-value-bind - (err? utime stime maxrss ixrss idrss isrss minflt majflt) - (sb!unix:unix-getrusage sb!unix:rusage_self) - (declare (ignore maxrss ixrss idrss isrss minflt)) - (unless err? ; FIXME: nonmnemonic (reversed) name for ERR? - (error "Unix system call getrusage failed: ~A." (strerror utime))) - (values utime stime majflt))) + ;; FIXME: number of page faults is always zero + (multiple-value-bind (creation-time exit-time kernel-time user-time) + (sb!win32:get-process-times) + (declare (ignore creation-time exit-time)) + (values (floor user-time 10) (floor kernel-time 10) 0))) ;;; Return the system page size. (defun get-page-size ()