/[cmucl]/src/code/machdef.lisp
ViewVC logotype

Contents of /src/code/machdef.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations)
Fri Mar 19 15:18:59 2010 UTC (4 years 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.7: +2 -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 ;;; -*- Log: code.log; Package: Mach -*-
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/machdef.lisp,v 1.8 2010/03/19 15:18:59 rtoy Rel $")
9 ;;;
10 ;;; **********************************************************************
11 ;;;
12 ;;; Record definitions needed for the interface to Mach.
13 ;;;
14 (in-package "MACH")
15 (intl:textdomain "cmucl")
16
17 (export '(msg-simplemsg msg-msgsize msg-msgtype msg-localport msg-remoteport
18 msg-id sigmask with-trap-arg-block))
19
20 (export '(int-array int-array-ref))
21
22 (def-c-type c-string (pointer simple-base-string))
23
24 (defrecord Msg
25 (Reserved1 (unsigned-byte 8) 8)
26 (Reserved2 (unsigned-byte 8) 8)
27 (Reserved3 (unsigned-byte 8) 8)
28 (Reserved4 (unsigned-byte 7) 7)
29 (SimpleMsg boolean 1)
30 (MsgSize (signed-byte 32) 32)
31 (MsgType (signed-byte 32) 32)
32 (LocalPort port 32)
33 (RemotePort port 32)
34 (ID (signed-byte 32) 32))
35
36 (defrecord timeval
37 (seconds (unsigned-byte 32) (long-words 1))
38 (useconds (signed-byte 32) (long-words 1)))
39
40 (defrecord timezone
41 (minuteswest (signed-byte 32) (long-words 1))
42 (dsttime (signed-byte 32) (long-words 1)))
43
44 (def-c-array int-array unsigned-long 32)
45
46 (eval-when (compile load eval)
47
48 (defrecord tchars
49 (intrc (signed-byte 8) (bytes 1))
50 (quitc (signed-byte 8) (bytes 1))
51 (startc (signed-byte 8) (bytes 1))
52 (stopc (signed-byte 8) (bytes 1))
53 (eofc (signed-byte 8) (bytes 1))
54 (brkc (signed-byte 8) (bytes 1)))
55
56 (defrecord ltchars
57 (suspc (signed-byte 8) (bytes 1))
58 (dsuspc (signed-byte 8) (bytes 1))
59 (rprntc (signed-byte 8) (bytes 1))
60 (flushc (signed-byte 8) (bytes 1))
61 (werasc (signed-byte 8) (bytes 1))
62 (lnextc (signed-byte 8) (bytes 1)))
63
64 ); eval-when (compile load eval)
65
66
67 (defmacro with-trap-arg-block (type var &body forms)
68 `(with-stack-alien (,var ,type (record-size ',type))
69 ,@forms))
70
71 ;;; SIGMASK -- Public
72 ;;;
73 (defmacro sigmask (&rest signals)
74 "Returns a mask given a set of signals."
75 (apply #'logior
76 (mapcar #'(lambda (signal)
77 (ash 1 (1- (unix-signal-number signal))))
78 signals)))
79

  ViewVC Help
Powered by ViewVC 1.1.5