Skip to content
Snippets Groups Projects
Commit ede7bc95 authored by toy's avatar toy
Browse files

From Eric Marsden:

   Under Linux, the SOFTWARE-VERSION function now returns information
   on the current kernel taken from /proc/version (instead of "n/a").
   Under Linux and xBSD, the internal GET-PAGE-SIZE function obtains
   the page size from the operating system via the getpagesize()
   library call, instead of returning a hard-coded value.

A few random typos were also fixed.
parent d1a7c168
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/bsd-os.lisp,v 1.5 2002/01/28 20:17:08 pmai Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/bsd-os.lisp,v 1.6 2002/11/18 13:52:24 toy Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -71,5 +71,9 @@
;;; Return the system page size.
;;;
(defun get-page-size ()
;; probably should call getpagesize()
4096)
(multiple-value-bind (val err)
(unix:unix-getpagesize)
(unless val
(error "Getpagesize failed: ~A" (unix:get-unix-error-msg err)))
val))
......@@ -5,16 +5,16 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/linux-os.lisp,v 1.2 2002/10/07 14:31:04 toy Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/linux-os.lisp,v 1.3 2002/11/18 13:52:24 toy Exp $")
;;;
;;; **********************************************************************
;;;
;;; OS interface functions for CMU CL under Mach.
;;; OS interface functions for CMUCL under Linux.
;;;
;;; Written and maintained mostly by Skef Wholey and Rob MacLachlan.
;;; Scott Fahlman, Dan Aronson, and Steve Handerson did stuff here, too.
;;;
;;; Hacked into Linux-os.lisp /Werkowski
;;; Derived from mach-os.lisp by Paul Werkowski
(in-package "SYSTEM")
(use-package "EXTENSIONS")
......@@ -26,23 +26,14 @@
(defun software-version ()
"Returns a string describing version of the supporting software."
#+nil
(string-trim '(#\newline)
(with-output-to-string (stream)
(run-program "/usr/cs/etc/version" ; Site dependent???
nil :output stream)))
"n/a")
(when (probe-file "/proc/version")
(with-open-file (f "/proc/version")
(read-line f))))
;;; OS-Init initializes our operating-system interface. It sets the values
;;; of the global port variables to what they should be and calls the functions
;;; that set up the argument blocks for the server interfaces.
(defvar *task-self*)
(defun os-init () ; don't know what to do here
#+sparc ;; Can't use #x20000000 thru #xDFFFFFFF, but mach tries to let us.
(system:allocate-system-memory-at (system:int-sap #x20000000) #xc0000000))
;;; OS-Init initializes our operating-system interface.
;;;
(defun os-init () nil)
;;; GET-SYSTEM-INFO -- Interface
......@@ -66,6 +57,9 @@
;;; Return the system page size.
;;;
(defun get-page-size ()
;; probably should call getpagesize()
4096)
(multiple-value-bind (val err)
(unix:unix-getpagesize)
(unless val
(error "Getpagesize failed: ~A" (unix:get-unix-error-msg err)))
val))
......@@ -5,13 +5,14 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/sunos-os.lisp,v 1.9 1998/01/29 07:22:50 dtc Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/sunos-os.lisp,v 1.10 2002/11/18 13:52:24 toy Exp $")
;;;
;;; **********************************************************************
;;;
;;; OS interface functions for CMU CL under Mach. From Miles Bader and David
;;; OS interface functions for CMUCL under SunOS. From Miles Bader and David
;;; Axmark.
;;;
(in-package "SYSTEM")
(use-package "EXTENSIONS")
(export '(get-system-info get-page-size os-init))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment