0.8.3.23
authorDaniel Barlow <dan@telent.net>
Tue, 2 Sep 2003 00:08:14 +0000 (00:08 +0000)
committerDaniel Barlow <dan@telent.net>
Tue, 2 Sep 2003 00:08:14 +0000 (00:08 +0000)
commitb7eed59f1877263e1af5ad80299e641e8276f77d
treeddc8b911c96c2ea191786ee4c02979796701d1e1
parentf51d3fd40bb44b518299f0ae626583a6899f7af2
0.8.3.23
Exciting gencgc hacking: SB-SYS:WITH-PINNED-OBJECTS

When passing Lisp objects to foreign code, it is important
that GC doesn't change the object's address as the foreign
code's pointers to it won't be updated.  Traditionally this is
done using WITHOUT-GCING, but that's not ideal in a threaded
system where one thread may be doing a blocking alien call and
other threads would like to continue as normal.

So, instead we shove pointers to the important objects on the
C stack where they will cause the pages pointed to to be
pinned in place using preserve_pointers.  Additionally we make
a small change to gencgc to ensure that they _stay_ pinned in
subsequent GCs

On ports that use cheneygc we can't do this, so
WITH-PINNED-OBJECTS is just an alias for WITHOUT-GCING.  As
these ports don't have threads anyway, that's not a major
inconvenience.

Small updates to doc/internals-notes/threading-specials,
slightly larger updates to comments regarding ALLOCATION
and PSEUDO-ATOMIC macros

Documentation update to the FFI chapter
18 files changed:
contrib/sb-bsd-sockets/foreign-glue.lisp
contrib/sb-bsd-sockets/name-service.lisp
contrib/sb-bsd-sockets/sockets.lisp
doc/beyond-ansi.sgml
doc/ffi.sgml
doc/internals-notes/threading-specials
doc/intro.sgml
package-data-list.lisp-expr
src/compiler/alpha/macros.lisp
src/compiler/fndb.lisp
src/compiler/hppa/macros.lisp
src/compiler/mips/macros.lisp
src/compiler/ppc/macros.lisp
src/compiler/sparc/macros.lisp
src/compiler/x86/c-call.lisp
src/compiler/x86/macros.lisp
src/runtime/gencgc.c
version.lisp-expr