rts: Make StablePtr derefs thread-safe (#10296)
authorJason Eisenberg <jasoneisenberg@gmail.com>
Mon, 4 Apr 2016 08:57:39 +0000 (10:57 +0200)
committerBen Gamari <ben@smart-cactus.org>
Mon, 4 Apr 2016 09:32:44 +0000 (11:32 +0200)
commit90d7d6086ed6f271a352e784c3bc1d5ecac6052c
tree7e36d55c4e3beecdc5bad98f0b6c7b4a4efcdf91
parentf2a2b79fa8d1c702b17e195a70734b06625e0153
rts: Make StablePtr derefs thread-safe (#10296)

Stable pointers can now be safely dereferenced while the stable pointer
table is simultaneously being enlarged.

Test Plan: ./validate

Reviewers: ezyang, austin, bgamari, simonmar

Subscribers: carter, thomie

Differential Revision: https://phabricator.haskell.org/D2031

GHC Trac Issues: #10296
rts/Stable.c
testsuite/tests/rts/Makefile
testsuite/tests/rts/T10296a.hs [new file with mode: 0644]
testsuite/tests/rts/T10296a_c.c [new file with mode: 0644]
testsuite/tests/rts/T10296b.hs [new file with mode: 0644]
testsuite/tests/rts/all.T