Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
a1582607 by Raymond Toy at 2015-10-31T12:57:07Z
Revert e15cd9fa
Don't print BREAK as INT3 because it looks funny. The disassembly
looks like
INT3 <code>
instead of
BREAK <code>
To do this properly requires a lot more work to get the code printed
on the next line and also getting the disassembler to recognize the
break case.
- - - - -
1 changed file:
- src/compiler/x86/insts.lisp
Changes:
=====================================
src/compiler/x86/insts.lisp
=====================================
--- a/src/compiler/x86/insts.lisp
+++ b/src/compiler/x86/insts.lisp
@@ -2105,7 +2105,6 @@
(define-instruction break (segment code)
(:declare (type (unsigned-byte 8) code))
(:printer byte-imm ((op #b11001100)) '(:name :tab code)
- :print-name 'int3
:control #'break-control)
(:emitter
(emit-byte segment #b11001100)
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/a15826079090bccf6eb48cb11…
Raymond Toy pushed to branch rtoy-grand-unix-unification at cmucl / cmucl
Commits:
3dd45a3a by Raymond Toy at 2015-10-31T10:26:48Z
Regenerated.
- - - - -
1 changed file:
- src/i18n/locale/cmucl-unix.pot
Changes:
=====================================
src/i18n/locale/cmucl-unix.pot
=====================================
--- a/src/i18n/locale/cmucl-unix.pot
+++ b/src/i18n/locale/cmucl-unix.pot
@@ -166,6 +166,17 @@ msgstr ""
#: src/code/unix.lisp
msgid ""
+"UNIX-LSEEK accepts a file descriptor and moves the file pointer ahead\n"
+" a certain OFFSET for that file. WHENCE can be any of the following:\n"
+"\n"
+" l_set Set the file pointer.\n"
+" l_incr Increment the file pointer.\n"
+" l_xtnd Extend the file size.\n"
+" "
+msgstr ""
+
+#: src/code/unix.lisp
+msgid ""
"Unix-mkdir creates a new directory with the specified name and mode.\n"
" (Same as those for unix-chmod.) It returns T upon success, otherwise\n"
" NIL and an error number."
@@ -222,6 +233,10 @@ msgid "Synchronous writes (on ext2)"
msgstr ""
#: src/code/unix.lisp
+msgid "Asynchronous I/O"
+msgstr ""
+
+#: src/code/unix.lisp
msgid ""
"Unix-open opens the file whose pathname is specified by path\n"
" for reading and/or writing as specified by the flags argument.\n"
@@ -264,6 +279,15 @@ msgid ""
msgstr ""
#: src/code/unix.lisp
+msgid ""
+"Unix-dup2 duplicates an existing file descriptor just as unix-dup\n"
+" does only the new value of the duplicate descriptor may be requested\n"
+" through the second argument. If a file already exists with the\n"
+" requested descriptor number, it will be closed and the number\n"
+" assigned to the duplicate."
+msgstr ""
+
+#: src/code/unix.lisp
msgid "Duplicate a file descriptor"
msgstr ""
@@ -371,6 +395,14 @@ msgstr ""
#: src/code/unix.lisp
msgid ""
+"UNIX-READ attempts to read from the file described by fd into\n"
+" the buffer buf until it is full. Len is the length of the buffer.\n"
+" The number of bytes actually read is returned or NIL and an error\n"
+" number if an error occured."
+msgstr ""
+
+#: src/code/unix.lisp
+msgid ""
"Unix-readlink invokes the readlink system call on the file name\n"
" specified by the simple string path. It returns up to two values:\n"
" the contents of the symbolic link if the call is successful, or\n"
@@ -398,6 +430,14 @@ msgstr ""
#: src/code/unix.lisp
msgid ""
+"Define an ioctl command. If the optional ARG and PARM-TYPE are given\n"
+" then ioctl argument size and direction are included as for ioctls defined\n"
+" by _IO, _IOR, _IOW, or _IOWR. If DEV is a character then the ioctl type\n"
+" is the characters code, else DEV may be an integer giving the type."
+msgstr ""
+
+#: src/code/unix.lisp
+msgid ""
"Unix-ioctl performs a variety of operations on open i/o\n"
" descriptors. See the UNIX Programmer's Manual for more\n"
" information."
@@ -491,6 +531,38 @@ msgid ""
msgstr ""
#: src/code/unix.lisp
+msgid "These bits determine file type."
+msgstr ""
+
+#: src/code/unix.lisp
+msgid "Directory"
+msgstr ""
+
+#: src/code/unix.lisp
+msgid "Character device"
+msgstr ""
+
+#: src/code/unix.lisp
+msgid "FIFO"
+msgstr ""
+
+#: src/code/unix.lisp
+msgid "Block device"
+msgstr ""
+
+#: src/code/unix.lisp
+msgid "Regular file"
+msgstr ""
+
+#: src/code/unix.lisp
+msgid "Symbolic link."
+msgstr ""
+
+#: src/code/unix.lisp
+msgid "Socket."
+msgstr ""
+
+#: src/code/unix.lisp
msgid "Returns either :file, :directory, :link, :special, or NIL."
msgstr ""
@@ -1226,6 +1298,14 @@ msgstr ""
#: src/code/unix.lisp
msgid ""
+"Unix-getitimer returns the INTERVAL and VALUE slots of one of\n"
+" three system timers (:real :virtual or :profile). On success,\n"
+" unix-getitimer returns 5 values,\n"
+" T, it-interval-secs, it-interval-usec, it-value-secs, it-value-usec."
+msgstr ""
+
+#: src/code/unix.lisp
+msgid ""
"Return a USER-INFO structure for the user identified by UID, or NIL if not "
"found."
msgstr ""
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/3dd45a3a9e0d1cc1c6c2a7dff…
Raymond Toy pushed to branch rtoy-grand-unix-unification at cmucl / cmucl
Commits:
95279cab by Raymond Toy at 2015-10-19T22:02:24Z
Move over more items from unix-glibc2.lisp.
These should be the last things that need to be moved.
- - - - -
1 changed file:
- src/code/unix.lisp
Changes:
=====================================
src/code/unix.lisp
=====================================
--- a/src/code/unix.lisp
+++ b/src/code/unix.lisp
@@ -650,6 +650,20 @@
(declare (type unix-fd fd))
(int-syscall ("dup" int) fd))
+;;; Unix-dup2 makes the second file-descriptor describe the same file
+;;; as the first. If the second file-descriptor points to an open
+;;; file, it is first closed. In any case, the second should have a
+;;; value which is a valid file-descriptor.
+
+(defun unix-dup2 (fd1 fd2)
+ _N"Unix-dup2 duplicates an existing file descriptor just as unix-dup
+ does only the new value of the duplicate descriptor may be requested
+ through the second argument. If a file already exists with the
+ requested descriptor number, it will be closed and the number
+ assigned to the duplicate."
+ (declare (type unix-fd fd1 fd2))
+ (void-syscall ("dup2" int int) fd1 fd2))
+
;;; Unix-fcntl takes a file descriptor, an integer command
;;; number, and optional command arguments. It performs
;;; operations on the associated file and/or returns inform-
@@ -686,8 +700,8 @@
#+osf1 #o100000
#-(or linux osf1) #o0004
_N"Non-blocking reads")
-(defconstant FAPPEND #-linux #o0010 #+linux #o2000 _N"Append on each write")
-(defconstant FASYNC #-(or linux svr4) #o0100 #+svr4 #o10000 #+linux #o20000
+(defconstant FAPPEND #-linux #o0010 #+linux o_append _N"Append on each write")
+(defconstant FASYNC #-(or linux svr4) #o0100 #+svr4 #o10000 #+linux o_asyn
_N"Signal pgrp when data ready")
;; doesn't exist in Linux ;-(
#-linux (defconstant FCREAT #-(or hpux svr4) #o1000 #+(or hpux svr4) #o0400
@@ -907,7 +921,7 @@
;; output modes
#-bsd (def-enum ash 1 tty-opost tty-olcuc tty-onlcr tty-ocrnl tty-onocr
- tty-onlret tty-ofill tty-ofdel)
+ tty-onlret tty-ofill tty-ofdel #+linux tty-nldly)
#+bsd (def-enum ash 1 tty-opost tty-onlcr)
;; local modes
@@ -1658,15 +1672,15 @@
;;;; Support routines for dealing with unix pathnames.
-(defconstant s-ifmt #o0170000)
-(defconstant s-ifdir #o0040000)
-(defconstant s-ifchr #o0020000)
+(defconstant s-ifmt #o0170000 _N"These bits determine file type.")
+(defconstant s-ifdir #o0040000 _N"Directory")
+(defconstant s-ifchr #o0020000 _N"Character device")
#+linux
(defconstant s-ififo #o0010000 _N"FIFO")
-(defconstant s-ifblk #o0060000)
-(defconstant s-ifreg #o0100000)
-(defconstant s-iflnk #o0120000)
-(defconstant s-ifsock #o0140000)
+(defconstant s-ifblk #o0060000 _N"Block device")
+(defconstant s-ifreg #o0100000 _N"Regular file")
+(defconstant s-iflnk #o0120000 _N"Symbolic link.")
+(defconstant s-ifsock #o0140000 _N"Socket.")
(defconstant s-isuid #o0004000)
(defconstant s-isgid #o0002000)
(defconstant s-isvtx #o0001000)
@@ -2291,8 +2305,9 @@
(def-alien-type nil
(struct timeval
- (tv-sec #-linux time-t #+linux int) ; seconds
- (tv-usec int))) ; and microseconds
+ (tv-sec time-t) ; seconds
+ (tv-usec #-linux int
+ #+linux time-t))) ; and microseconds
(def-alien-type nil
(struct timezone
@@ -2609,6 +2624,7 @@
(defconstant ITIMER-VIRTUAL 1)
(defconstant ITIMER-PROF 2)
+#-linux
(defun unix-setitimer (which int-secs int-usec val-secs val-usec)
_N" Unix-setitimer sets the INTERVAL and VALUE slots of one of
three system timers (:real :virtual or :profile). A SIGALRM signal
@@ -2644,6 +2660,28 @@
(slot (slot itvo 'it-value) 'tv-usec))
which (alien-sap (addr itvn))(alien-sap (addr itvo))))))
+#+linux
+(defun unix-getitimer (which)
+ _N"Unix-getitimer returns the INTERVAL and VALUE slots of one of
+ three system timers (:real :virtual or :profile). On success,
+ unix-getitimer returns 5 values,
+ T, it-interval-secs, it-interval-usec, it-value-secs, it-value-usec."
+ (declare (type (member :real :virtual :profile) which)
+ (values t
+ (unsigned-byte 29)(mod 1000000)
+ (unsigned-byte 29)(mod 1000000)))
+ (let ((which (ecase which
+ (:real ITIMER-REAL)
+ (:virtual ITIMER-VIRTUAL)
+ (:profile ITIMER-PROF))))
+ (with-alien ((itv (struct itimerval)))
+ (syscall* ("getitimer" int (* (struct itimerval)))
+ (values T
+ (slot (slot itv 'it-interval) 'tv-sec)
+ (slot (slot itv 'it-interval) 'tv-usec)
+ (slot (slot itv 'it-value) 'tv-sec)
+ (slot (slot itv 'it-value) 'tv-usec))
+ which (alien-sap (addr itv))))))
;;;; User and group database access, POSIX Standard 9.2.2
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/95279cabd8a73af41a1f2c246…
Raymond Toy pushed to branch rtoy-mmap-anon-control-and-binding-stacks at cmucl / cmucl
Commits:
20f530c4 by Raymond Toy at 2015-10-19T21:13:12Z
Fix for FreeBSD: Use control_stack/binding_stack instead of
CONTROL_STACK_START and BINDING_STACK_START.
Fred Gilham says the same fix is needed for FreeBSD as for NetBSD.
- - - - -
1 changed file:
- src/lisp/FreeBSD-os.c
Changes:
=====================================
src/lisp/FreeBSD-os.c
=====================================
--- a/src/lisp/FreeBSD-os.c
+++ b/src/lisp/FreeBSD-os.c
@@ -224,8 +224,8 @@ valid_addr(os_vm_address_t addr)
#ifndef GENCGC
|| in_range_p(addr, DYNAMIC_1_SPACE_START, dynamic_space_size)
#endif
- || in_range_p(addr, CONTROL_STACK_START, control_stack_size)
- || in_range_p(addr, BINDING_STACK_START, binding_stack_size))
+ || in_range_p(addr, control_stack, control_stack_size)
+ || in_range_p(addr, binding_stack, binding_stack_size))
return TRUE;
return FALSE;
}
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/20f530c4388452cf3f9f66ee1…