[Openmcl-cvs-notifications] r12240 - in /trunk/source/level-1: l1-streams.lisp l1-sysio.lisp
gb at clozure.com
gb at clozure.com
Wed Jun 10 04:41:20 EDT 2009
Author: gb
Date: Wed Jun 10 04:41:20 2009
New Revision: 12240
Log:
(experimentally) change the semantics of streams' :sharing :private =
option: stream is "owned" by the first thread to do I/O on it, not
necessarily the creating thread.
INFER-LINE-TERMINATION on file streams: if the creating thread does
I/O (to infer line termination), renounce ownership after doing so.
Modified:
trunk/source/level-1/l1-streams.lisp
trunk/source/level-1/l1-sysio.lisp
Modified: trunk/source/level-1/l1-streams.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/level-1/l1-streams.lisp (original)
+++ trunk/source/level-1/l1-streams.lisp Wed Jun 10 04:41:20 2009
@@ -480,6 +480,7 @@
(let* ((owner (ioblock-owner ioblock)))
(if owner
(or (eq owner *current-process*)
+ (conditional-store (ioblock-owner ioblock) 0 *current-process*)
(error "Stream ~s is private to ~s" (ioblock-stream ioblock) own=
er)))))
=
=
@@ -3102,7 +3103,7 @@
ioblock))
(stream-create-ioblock stream))))
(when (eq sharing :private)
- (setf (ioblock-owner ioblock) *current-process*))
+ (setf (ioblock-owner ioblock) 0))
(setf (ioblock-encoding ioblock) encoding)
(when insize
(unless (ioblock-inbuf ioblock)
@@ -4760,11 +4761,13 @@
=
(defmethod stream-owner ((stream buffered-stream-mixin))
(let* ((ioblock (stream-ioblock stream nil)))
- (and ioblock (ioblock-owner ioblock))))
+ (and ioblock (let* ((owner (ioblock-owner ioblock)))
+ (unless (eql owner 0) owner)))))
=
(defmethod stream-owner ((stream basic-stream))
(let* ((ioblock (basic-stream.state stream)))
- (and ioblock (ioblock-owner ioblock))))
+ (and ioblock (let* ((owner (ioblock-owner ioblock)))
+ (unless (eql owner 0) owner)))))
=
=
(defclass buffered-input-stream-mixin
Modified: trunk/source/level-1/l1-sysio.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/level-1/l1-sysio.lisp (original)
+++ trunk/source/level-1/l1-sysio.lisp Wed Jun 10 04:41:20 2009
@@ -75,7 +75,9 @@
(when line-termination
(install-ioblock-input-line-termination file-ioblock line-term=
ination)
(when (file-ioblock-outbuf file-ioblock)
- (install-ioblock-output-line-termination file-ioblock line-t=
ermination))))))))
+ (install-ioblock-output-line-termination file-ioblock line-t=
ermination))))))
+ (when (eq (ioblock-owner file-ioblock) *current-process*)
+ (setf (ioblock-owner file-ioblock) 0))))
=
=
=
More information about the Openmcl-cvs-notifications
mailing list