/[cmucl]/src/code/irix-os.lisp
ViewVC logotype

Contents of /src/code/irix-os.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations)
Fri Mar 19 15:18:59 2010 UTC (4 years, 1 month ago) by rtoy
Branch: MAIN
CVS Tags: sparc-tramp-assem-base, post-merge-intl-branch, release-20b-pre1, release-20b-pre2, sparc-tramp-assem-2010-07-19, GIT-CONVERSION, cross-sol-x86-merged, RELEASE_20b, cross-sol-x86-base, snapshot-2010-12, snapshot-2010-11, snapshot-2011-09, snapshot-2011-06, snapshot-2011-07, snapshot-2011-04, snapshot-2011-02, snapshot-2011-03, snapshot-2011-01, snapshot-2010-05, snapshot-2010-04, snapshot-2010-07, snapshot-2010-06, snapshot-2010-08, cross-sol-x86-2010-12-20, cross-sparc-branch-base, HEAD
Branch point for: cross-sparc-branch, RELEASE-20B-BRANCH, sparc-tramp-assem-branch, cross-sol-x86-branch
Changes since 1.3: +3 -1 lines
Merge intl-branch 2010-03-18 to HEAD.  To build, you need to use
boot-2010-02-1 as the bootstrap file.  You should probably also use
the new -P option for build.sh to generate and update the po files
while building.
1 ;;; -*- Mode: Lisp; Package: Lisp; Log: code.log -*-
2 ;;;
3 ;;; **********************************************************************
4 ;;; This code was written as part of the CMU Common Lisp project at
5 ;;; Carnegie Mellon University, and has been placed in the public domain.
6 ;;;
7 (ext:file-comment
8 "$Header: /tiger/var/lib/cvsroots/cmucl/src/code/irix-os.lisp,v 1.4 2010/03/19 15:18:59 rtoy Rel $")
9 ;;;
10 ;;; **********************************************************************
11 ;;;
12 ;;; OS interface functions for CMU CL under IRIX.
13 ;;;
14 ;;;
15 (in-package "SYSTEM")
16 (use-package "EXTENSIONS")
17 (intl:textdomain "cmucl")
18
19 (export '(get-system-info get-page-size os-init))
20
21 (pushnew :irix *features*)
22 (pushnew :svr4 *features*)
23
24 (setq *software-type* "IRIX")
25
26 (defvar *software-version* nil "Version string for supporting software")
27
28 (defun software-version ()
29 "Returns a string describing version of the supporting software."
30 (unless *software-version*
31 (setf *software-version*
32 (let ((version-line
33 (with-output-to-string (stream)
34 (run-program "/usr/bin/uname"
35 '("-r" )
36 :output stream
37 :pty nil
38 :error nil))))
39 (subseq version-line 0 (1- (length version-line))))))
40 *software-version*)
41
42
43 ;;; OS-INIT -- interface.
44 ;;;
45 ;;; Other OS dependent initializations.
46 ;;;
47 (defun os-init ()
48 ;; Decache version on save, because it might not be the same when we restart.
49 (setf *software-version* nil))
50
51 ;;; GET-SYSTEM-INFO -- Interface
52 ;;;
53 ;;; Return system time, user time and number of page faults.
54 ;;;
55 (defun get-system-info ()
56 (multiple-value-bind
57 (err? utime stime maxrss ixrss idrss isrss minflt majflt)
58 (unix:unix-getrusage unix:rusage_self)
59 (declare (ignore maxrss ixrss idrss isrss minflt))
60 (cond ((null err?)
61 (error "Unix system call getrusage failed: ~A."
62 (unix:get-unix-error-msg utime)))
63 (T
64 (values utime stime majflt)))))
65
66
67 ;;; GET-PAGE-SIZE -- Interface
68 ;;;
69 ;;; Return the system page size.
70 ;;;
71 (defun get-page-size ()
72 (multiple-value-bind (val err)
73 (unix:unix-getpagesize)
74 (unless val
75 (error "Getpagesize failed: ~A" (unix:get-unix-error-msg err)))
76 val))
77

  ViewVC Help
Powered by ViewVC 1.1.5