[sgen] Make GC handles table lock-free.
authorJon Purdy <evincarofautumn@gmail.com>
Wed, 7 Jan 2015 01:44:19 +0000 (17:44 -0800)
committerJon Purdy <evincarofautumn@gmail.com>
Thu, 3 Sep 2015 23:07:05 +0000 (16:07 -0700)
commit140ec68ddccb9466fcbed2e9f24b564bec1ffe22
treed9e23093709da79df01acccd195567b7ae0ed9aa
parent87fb34d18a733168a91df8d2358f233a2382a62d
[sgen] Make GC handles table lock-free.

The previous code was hard to make lock-free because it was trying to
coordinate three separate buffers: one of GC handles, one of a
free-bitmap, and one used to get the domain ID for an expired weak
reference. Now all of this information is stored in a single tagged
pointer per entry.

 * Make the GC lock non-recursive again.

 * Correctly null links for domain unloading.

 * Ensure that non-weak handles are registered as roots using the
   correct descriptors.
15 files changed:
mono/metadata/boehm-gc.c
mono/metadata/gc-internal.h
mono/metadata/gc.c
mono/metadata/marshal.c
mono/metadata/reflection.c
mono/metadata/sgen-bridge-internal.h
mono/metadata/sgen-bridge.c
mono/metadata/sgen-mono.c
mono/mini/mini-exceptions.c
mono/mini/mini-runtime.c
mono/sgen/gc-internal-agnostic.h
mono/sgen/sgen-cardtable.c
mono/sgen/sgen-fin-weak-hash.c
mono/sgen/sgen-gc.c
mono/sgen/sgen-gc.h