Commit [4f7161] Maximize Restore History

1.0.15.31: thread-safe FIND-CLASS -- really this time

Call It Myopia: it turns out FIND-CLASSOID &co underneath FIND-CLASS
(when called for non-existent classes) were not thread-safe either.

* Get rid of *FIND-CLASS* hash-table, moving the actual PCL classes into
corresponding CLASSOID-CELL (new slot PCL-CLASS).

* Move classoid-cells from the infodb into into *CLASSOID-CELLS*
hash-table. We want to be able to lock around

(or (get-cell) (setf (get-cell) (make-cell)))

and infodb isn't really designed for that. This is the crux of
the breakage:

*** parallel writes to infodb are not thread safe! ***

* Lock over *CLASSOID-CELLS* and *FORWARD-REFERENCED-LAYOUTS*. The
latter should not be really necessary as long as we don't
assume (SETF FIND-CLASS) to be thread-safe, but easier to reason
about it this way. ...and it would be nice for the SETF to be safe
as well.

Related work:

* Don't create cells for non-exitent classes unless we know we are
going to need them -- previously both FIND-CLASSOID and FIND-CLASS
created a cell for every name they were called with, which is
isn't too good. This is especially important as once created these
cells never go away!

Nikodemus Siivola Nikodemus Siivola 2008-03-14

changed src/code/class-init.lisp
changed src/code/class.lisp
changed src/code/defstruct.lisp
changed src/compiler/compiler-deftype.lisp
changed src/compiler/fndb.lisp
changed src/compiler/globaldb.lisp
changed src/compiler/typetran.lisp
changed src/pcl/braid.lisp
changed src/pcl/defs.lisp
changed src/pcl/early-low.lisp
changed src/pcl/macros.lisp
changed src/pcl/wrapper.lisp
changed tests/threads.pure.lisp
changed package-data-list.lisp-expr
changed version.lisp-expr
src/code/class-init.lisp Diff Switch to side-by-side view
Loading...
src/code/class.lisp Diff Switch to side-by-side view
Loading...
src/code/defstruct.lisp Diff Switch to side-by-side view
Loading...
src/compiler/compiler-deftype.lisp Diff Switch to side-by-side view
Loading...
src/compiler/fndb.lisp Diff Switch to side-by-side view
Loading...
src/compiler/globaldb.lisp Diff Switch to side-by-side view
Loading...
src/compiler/typetran.lisp Diff Switch to side-by-side view
Loading...
src/pcl/braid.lisp Diff Switch to side-by-side view
Loading...
src/pcl/defs.lisp Diff Switch to side-by-side view
Loading...
src/pcl/early-low.lisp Diff Switch to side-by-side view
Loading...
src/pcl/macros.lisp Diff Switch to side-by-side view
Loading...
src/pcl/wrapper.lisp Diff Switch to side-by-side view
Loading...
tests/threads.pure.lisp Diff Switch to side-by-side view
Loading...
package-data-list.lisp-expr Diff Switch to side-by-side view
Loading...
version.lisp-expr Diff Switch to side-by-side view
Loading...