Ignore:
Timestamp:
Jul 20, 2006, 9:43:40 AM (13 years ago)
Author:
gb
Message:

First (rough) cut at making streams "private" (effectively always locked by the
"owning" thread) to reduce some locking overhead. More to come, some of which
will be a little tricky to bootstrap.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-1/l1-sysio.lisp

    r2500 r4890  
    508508                         elements-per-buffer
    509509                         class
    510                          external-format)
     510                         external-format
     511                         private)
    511512
    512513  (let* ((temp-name nil)
     
    544545                   (setq native-truename (%create-file filename)))
    545546                  ((memq direction '(:output :io))
    546                    #|                   ;
    547                                         ; this prevents us from writing a file that is open for anything           
    548                                         ; but does not protect against reading a file that is open for :output
     547                   #| ;;
     548                   ;; this prevents us from writing a file that is open for anything           
     549                   ;;l but does not protect against reading a file that is open for :output
    549550                   (when (and bits (eq direction :output)(neq 0 (logand bits #x81)))
    550551                   (signal-file-error EBUSY filename))
     
    568569              (make-fd-stream fd :direction direction
    569570                              :element-type element-type
    570                               :elements-per-buffer elements-per-buffer)
     571                              :elements-per-buffer elements-per-buffer
     572                              :private private)
    571573              (let* ((in-p (member direction '(:io :input)))
    572574                     (out-p (member direction '(:io :output)))
     
    611613                                   'output-file-force-output))
    612614                               :device fd
    613                                :external-format real-external-format))
     615                               :external-format real-external-format
     616                               :private private))
    614617                     (ioblock (stream-ioblock fstream)))
    615618                (setf (stream-filename fstream) (namestring pathname)
Note: See TracChangeset for help on using the changeset viewer.