Ignore:
Timestamp:
Sep 16, 2008, 9:55:28 PM (12 years ago)
Author:
gz
Message:

Implement "nearly-lock-free" hash tables. All shared hash tables now
use this new algorithm (for more info see big comment in l0-hash.lisp).
To use the old hash tables, specify :lock-free nil as argument to
make-hash-table.

Incremented fasl version, in case there are any fasdumped hash tables out there.

While in there, changed defaults so that trying to write a read-only
table offers a restart to make it writable, with an appropriate warning.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/lib/macros.lisp

    r10653 r10776  
    31623162      (ecase sym
    31633163        (the `(the ,(cadr place) (atomic-incf-decf ,(caddr place) ,delta)))
     3164         ;; Needed so can handle %svref (which macroexpands into a LET*)
     3165         ((let let*) (multiple-value-bind (body decls) (parse-body (cddr place) env t)
     3166                       (unless (eql (length body) 1)
     3167                         (error "~S is not a valid atomic-incf/decf place" place))
     3168                       `(,sym ,(cadr place) ,@decls (atomic-incf-decf ,@body ,delta))))
     3169         ;; Ditto
     3170         (locally (multiple-value-bind (body decls) (parse-body (cdr place) env t)
     3171                    (unless (eql (length body) 1)
     3172                      (error "~S is not a valid atomic-incf/decf place" place))
     3173                    `(,sym ,@decls (atomic-incf-decf ,@body ,delta))))
    31643174        (car `(%atomic-incf-car ,(cadr place) ,delta))
    31653175        (cdr `(%atomic-incf-cdr ,(cadr place) ,delta))
    3166         ((svref %svref) `(%atomic-incf-gvector ,@(cdr place) ,delta))))
     3176        (svref `(%atomic-incf-gvector ,@(cdr place) ,delta))))
    31673177    (if (and (symbolp place) (eq :special (variable-information place env)))
    31683178      (let* ((base (gensym))
Note: See TracChangeset for help on using the changeset viewer.