Changeset 7809
- Timestamp:
- Dec 3, 2007, 3:30:34 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ccl/level-1/l1-streams.lisp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/level-1/l1-streams.lisp
r7635 r7809 5370 5370 (defun fd-stream-force-output (s ioblock count finish-p) 5371 5371 (when (or (ioblock-dirty ioblock) finish-p) 5372 (setf (ioblock-dirty ioblock) nil)5373 5372 (let* ((fd (ioblock-device ioblock)) 5374 5373 (io-buffer (ioblock-outbuf ioblock)) … … 5378 5377 (declare (fixnum octets)) 5379 5378 (declare (dynamic-extent buf)) 5380 (%setf-macptr buf (io-buffer-bufptr io-buffer)) 5381 (setf (io-buffer-idx io-buffer) 0 5382 (io-buffer-count io-buffer) 0) 5383 (do* () 5384 ((= octets 0) 5385 (when finish-p 5386 (case (%unix-fd-kind fd) 5387 (:file (fd-fsync fd)))) 5388 octets-to-write) 5389 (let* ((written (with-eagain fd :output 5390 (fd-write fd buf octets)))) 5391 (declare (fixnum written)) 5392 (if (< written 0) 5393 (stream-io-error s (- written) "write")) 5394 (decf octets written) 5395 (unless (zerop octets) 5396 (%incf-ptr buf written))))))) 5379 (without-interrupts 5380 (setf (ioblock-dirty ioblock) nil) 5381 (%setf-macptr buf (io-buffer-bufptr io-buffer)) 5382 (setf (io-buffer-idx io-buffer) 0 5383 (io-buffer-count io-buffer) 0) 5384 (do* () 5385 ((= octets 0) 5386 (when finish-p 5387 (case (%unix-fd-kind fd) 5388 (:file (fd-fsync fd)))) 5389 octets-to-write) 5390 (let* ((written (with-eagain fd :output 5391 (fd-write fd buf octets)))) 5392 (declare (fixnum written)) 5393 (if (< written 0) 5394 (stream-io-error s (- written) "write")) 5395 (decf octets written) 5396 (unless (zerop octets) 5397 (%incf-ptr buf written)))))))) 5397 5398 5398 5399 (defmethod stream-read-line ((s buffered-input-stream-mixin))
Note:
See TracChangeset
for help on using the changeset viewer.
