Ignore:
Timestamp:
Jan 1, 2008, 1:36:11 AM (13 years ago)
Author:
gb
Message:

Fix typo in BROADCAST-STREAM stream-write-list method name.

Define PROCESS-INPUT-WOULD-BLOCK, PROCESS-OUTPUT-WOULD-BLOCK.

Default FD-STREAM-ADVANCE method: don't wait, if we can assume
that the FD-READ can be interrupted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2-devel/ccl/level-1/l1-streams.lisp

    r7733 r7971  
    40894089             (broadcast-method stream-force-output (s))
    40904090             (broadcast-method stream-finish-output (s))
    4091              (broadcast-method stream-stream-write-list (s l c))
     4091             (broadcast-method stream-write-list (s l c))
    40924092             (broadcast-method stream-write-vector (s v start end)))
    40934093
     
    52015201                                 :unsigned-fullword)))))
    52025202
     5203(defun process-input-would-block (fd)
     5204  (if (logtest #$O_NONBLOCK (the fixnum (fd-get-flags fd)))
     5205    (process-input-wait fd)
     5206    (- #$ETIMEDOUT)))
     5207   
    52035208(defun process-input-wait (fd &optional ticks)
    52045209  "Wait until input is available on a given file-descriptor."
     
    52215226
    52225227
     5228(defun process-output-would-block (fd)
     5229  (if (logtest #$O_NONBLOCK (the fixnum (fd-get-flags fd)))
     5230    (process-output-wait fd)
     5231    (- #$ETIMEDOUT)))
    52235232
    52245233(defun process-output-wait (fd)
     
    53485357          (io-buffer-count buf) 0
    53495358          (ioblock-eof ioblock) nil)
    5350     (let* ((avail nil))
    5351       (when (or read-p (setq avail (stream-listen s)))
    5352         (if (and (ioblock-interactive ioblock)
    5353                  (not avail))
    5354           (process-input-wait fd))
     5359      (when (or read-p (stream-listen s))
    53555360        (let* ((n (with-eagain fd :input
    53565361                    (fd-read fd bufptr size))))
     
    53625367                    (ioblock-octets-to-elements ioblock n))
    53635368              (progn (setf (ioblock-eof ioblock) t)
    5364                      nil))))))))
     5369                     nil)))))))
    53655370
    53665371(defun fd-stream-eofp (s ioblock)
Note: See TracChangeset for help on using the changeset viewer.