DCE: delete :optional functionals.
[sbcl.git] / src / code / osf1-os.lisp
blob2c488e870ad5f76812452a55ee85966ea27c4f46
1 ;;;; OS interface functions for CMU CL under OSF/1
3 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; more information.
5 ;;;;
6 ;;;; This software is derived from the CMU CL system, which was
7 ;;;; written at Carnegie Mellon University and released into the
8 ;;;; public domain. The software is in the public domain and is
9 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
10 ;;;; files for more information.
12 (in-package "SB!SYS")
14 ;;; Check that target machine features are set up consistently with
15 ;;; this file.
16 #!-osf1 (error "missing :OSF1 feature")
18 (defun software-type ()
19 "Return a string describing the supporting software."
20 (values "OSF/1"))
22 (defun software-version ()
23 "Return a string describing version of the supporting software, or NIL
24 if not available."
25 (or *software-version*
26 (setf *software-version*
27 (string-trim '(#\newline)
28 (sb!kernel:with-simple-output-to-string (stream)
29 (run-program "/bin/uname" `("-r")
30 :output stream))))))
32 ;;; Return system time, user time and number of page faults.
33 (defun get-system-info ()
34 (multiple-value-bind
35 (err? utime stime maxrss ixrss idrss isrss minflt majflt)
36 (sb!unix:unix-getrusage sb!unix:rusage_self)
37 (declare (ignore maxrss ixrss idrss isrss minflt))
38 (unless err? ; FIXME: nonmnemonic (reversed) name for ERR?
39 (error "Unix system call getrusage failed: ~A." (strerror utime)))
40 (values utime stime majflt)))
42 ;;; support for CL:MACHINE-VERSION defined OAOO elsewhere
43 (defun get-machine-version ()
44 nil)