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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (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.2: +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/hpux-os.lisp,v 1.3 2010/03/19 15:18:59 rtoy Rel $")
9 ;;;
10 ;;; **********************************************************************
11 ;;;
12 ;;; OS interface functions for CMU CL under Mach. From Miles Bader and David
13 ;;; Axmark.
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 :hpux *features*)
22 (setq *software-type* "HPUX")
23
24 (defvar *software-version* nil "Version string for supporting software")
25
26 (defun software-version ()
27 "Returns a string describing version of the supporting software."
28 (unless *software-version*
29 (setf *software-version*
30 (let ((version-line
31 (with-output-to-string (stream)
32 (run-program "/usr/bin/uname"
33 '("-r" )
34 :output stream
35 :pty nil
36 :error nil))))
37 (subseq version-line 0 (1- (length version-line))))))
38 *software-version*)
39
40
41 ;;; OS-INIT -- interface.
42 ;;;
43 ;;; Other OS dependent initializations.
44 ;;;
45 (defun os-init ()
46 ;; Decache version on save, because it might not be the same when we restart.
47 (setf *software-version* nil))
48
49 ;;; GET-SYSTEM-INFO -- Interface
50 ;;;
51 ;;; Return system time, user time and number of page faults.
52 ;;;
53 (defun get-system-info ()
54 (multiple-value-bind
55 (err? utime stime maxrss ixrss idrss isrss minflt majflt)
56 (unix:unix-getrusage unix:rusage_self)
57 (declare (ignore maxrss ixrss idrss isrss minflt))
58 (cond ((null err?)
59 (error "Unix system call getrusage failed: ~A."
60 (unix:get-unix-error-msg utime)))
61 (T
62 (values utime stime majflt)))))
63
64
65 ;;; GET-PAGE-SIZE -- Interface
66 ;;;
67 ;;; Return the system page size.
68 ;;;
69 (defun get-page-size ()
70 (multiple-value-bind (val err)
71 (unix:unix-getpagesize)
72 (unless val
73 (error "Getpagesize failed: ~A" (unix:get-unix-error-msg err)))
74 val))

  ViewVC Help
Powered by ViewVC 1.1.5