1.0.22.22: (SETF FIND-CLASSOID) to drop DEFTYPE lambda-lists and source-locations
[sbcl/tcr.git] / src / code / osf1-os.lisp
blob59f63119cf29be92c78852c583aa7e49e15f74cc
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 #!+sb-doc
20 "Return a string describing the supporting software."
21 (values "OSF/1"))
23 (defun software-version ()
24 #!+sb-doc
25 "Return a string describing version of the supporting software, or NIL
26 if not available."
27 (or *software-version*
28 (setf *software-version*
29 (string-trim '(#\newline)
30 (with-output-to-string (stream)
31 (sb!ext:run-program "/bin/uname" `("-r")
32 :output stream))))))
34 ;;; Return system time, user time and number of page faults.
35 (defun get-system-info ()
36 (multiple-value-bind
37 (err? utime stime maxrss ixrss idrss isrss minflt majflt)
38 (sb!unix:unix-getrusage sb!unix:rusage_self)
39 (declare (ignore maxrss ixrss idrss isrss minflt))
40 (unless err? ; FIXME: nonmnemonic (reversed) name for ERR?
41 (error "Unix system call getrusage failed: ~A." (strerror utime)))
42 (values utime stime majflt)))
44 ;;; Return the system page size.
45 (defun get-page-size ()
46 ;; probably should call getpagesize()
47 ;; FIXME: Or we could just get rid of this, since the uses of it look
48 ;; disposable.
49 4096)