Changeset 9703


Ignore:
Timestamp:
Jun 9, 2008, 1:15:42 AM (11 years ago)
Author:
gb
Message:

Propagate decl changes from working-0711.
Primitives for suspend/resume/interrupt use traps for serialization.

Location:
branches/working-0711-perf/ccl/level-0
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711-perf/ccl/level-0/X86/x86-misc.lisp

    r9442 r9703  
    664664  @done
    665665  (single-value-return))
     666(defx86lapfunction %%tcr-interrupt ((target arg_z))
     667  (check-nargs 1)
     668  (ud2a)
     669  (:byte 4)
     670  (box-fixnum imm0 arg_z)
     671  (single-value-return))
     672
     673(defx86lapfunction %suspend-tcr ((target arg_z))
     674  (check-nargs 1)
     675  (ud2a)
     676  (:byte 5)
     677  (testl (%l imm0) (%l imm0))
     678  (movl ($ target::nil-value) (%l arg_z))
     679  (cmovel (@ target::t-offset (% arg_z)) (%l arg_z))
     680  (single-value-return))
     681
     682(defx86lapfunction %suspend-other-threads ()
     683  (check-nargs 0)
     684  (ud2a)
     685  (:byte 6)
     686  (movl ($ target::nil-value) (%l arg_z))
     687  (single-value-return))
     688
     689(defx86lapfunction %resume-tcr ((target arg_z))
     690  (check-nargs 1)
     691  (ud2a)
     692  (:byte 7)
     693  (testl (%l imm0) (%l imm0))
     694  (movl ($ target::nil-value) (%l arg_z))
     695  (cmovel (@ target::t-offset (% arg_z)) (%l arg_z))
     696  (single-value-return))
     697
     698(defx86lapfunction %resume-other-threads ()
     699  (check-nargs 0)
     700  (ud2a)
     701  (:byte 8)
     702  (movl ($ target::nil-value) (%l arg_z))
     703  (single-value-return))
     704
    666705
    667706(defx86lapfunction %get-spin-lock ((p arg_z))
  • branches/working-0711-perf/ccl/level-0/l0-int.lisp

    r5079 r9703  
    125125                    )  ; warn
    126126               (declare (dynamic-extent temstring)
    127                         (fixnum i strlen rem))
     127                        (fixnum i strlen))
    128128               (flet ((do-it (newbig)
    129129                        (print-bignum-2 newbig radix temstring digit-string)))
  • branches/working-0711-perf/ccl/level-0/l0-io.lisp

    r8705 r9703  
    8181                   (logior #x80 (the fixnum (logand #x3f (the fixnum (ash code -6))))))
    8282             (setf (%get-unsigned-byte pointer (the fixnum (+ idx 3)))
    83                    (logand #x3f code))
     83                   (logior #x80 (logand #x3f code)))
    8484             (incf idx 4))))))
    8585
     
    147147        (end (+ start noctets))
    148148        (nchars 0 (1+ nchars)))
    149        ((= i end) (values nchars i))
     149       ((= i end) (values nchars (- i start)))
    150150    (let* ((code (%get-unsigned-byte pointer i))
    151            (nexti (+ i (cond ((< code #x80) 1)
     151           (nexti (+ i (cond ((< code #xc2) 1)
    152152                             ((< code #xe0) 2)
    153153                             ((< code #xf0) 3)
    154                              (t 4)))))
     154                             ((< code #xf8) 4)
     155                             (t 1)))))
    155156      (declare (type (unsigned-byte 8) code))
    156157      (if (> nexti end)
    157         (return (values nchars i))
     158        (return (values nchars (- i start)))
    158159        (setq i nexti)))))
    159160
  • branches/working-0711-perf/ccl/level-0/l0-misc.lisp

    r7925 r9703  
    508508;;; to do otherwise.  The caller really needs to hold the heap-segment
    509509;;; lock; this grabs the tcr queue lock as well.
    510 (defun %suspend-other-threads ()
    511   (ff-call (%kernel-import target::kernel-import-suspend-other-threads)
    512            :void))
    513 
    514 (defun %resume-other-threads ()
    515   (ff-call (%kernel-import target::kernel-import-resume-other-threads)
    516            :void))
     510
     511
    517512
    518513(defparameter *spin-lock-tries* 1)
     
    639634         (level *interrupt-level*)
    640635         (ptr (recursive-lock-ptr lock)))
    641     (declare (fixnum self val))
     636    (declare (fixnum self))
    642637    (note-lock-wait lock)
    643638    (without-interrupts
     
    772767 
    773768 
    774 (defun %suspend-tcr (tcr)
    775   (with-macptrs (tcrp)
    776     (%setf-macptr-to-object tcrp tcr)
    777     (not (zerop (the fixnum
    778                   (ff-call (%kernel-import target::kernel-import-suspend-tcr)
    779                            :address tcrp
    780                            :unsigned-fullword))))))
    781 
    782 (defun %resume-tcr (tcr)
    783   (with-macptrs (tcrp)
    784     (%setf-macptr-to-object tcrp tcr)
    785     (not (zerop (the fixnum
    786                   (ff-call (%kernel-import target::kernel-import-resume-tcr)
    787                            :address tcrp
    788                            :unsigned-fullword))))))
     769
    789770
    790771
  • branches/working-0711-perf/ccl/level-0/nfasload.lisp

    r9507 r9703  
    7373         (bufptr (%get-ptr buffer)))
    7474    (declare (dynamic-extent bufptr)
    75              (type macptr buffer bufptr pb))
     75             (type macptr buffer bufptr))
    7676    (%setf-macptr bufptr (%inc-ptr buffer target::node-size))
    7777    (setf (%get-ptr buffer) bufptr)
     
    169169         (n nchars)
    170170         (str (faslstate.faslstr s)))
    171     (declare (fixnum n nbytes))
     171    (declare (fixnum n nchars))
    172172    (if (> n (length str))
    173173        (setq str (make-string n :element-type 'base-char))
     
    205205
    206206(defun %fasl-vmake-symbol (s &optional idx)
    207   (declare (fixnum subtype))
    208207  (let* ((n (%fasl-read-count s))
    209208         (str (make-string n :element-type 'base-char)))
     
    215214
    216215(defun %fasl-nvmake-symbol (s &optional idx)
    217   (declare (fixnum subtype))
    218216  (let* ((n (%fasl-read-count s))
    219217         (str (make-string n :element-type 'base-char)))
     
    578576         (size-in-bytes (* element-count 4))
    579577         (num (%alloc-misc element-count target::subtag-bignum)))
    580     (declare (fixnum subtag element-count size-in-bytes))
     578    (declare (fixnum element-count size-in-bytes))
    581579    (%fasl-read-n-bytes s num 0 size-in-bytes)
    582580    (setq num (%normalize-bignum-2 t num))
Note: See TracChangeset for help on using the changeset viewer.