diff options
author | Alexander Vershilov <alexander.vershilov@gmail.com> | 2015-01-12 05:29:18 -0600 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2015-01-13 10:10:38 -0600 |
commit | 7637810a93441d29bc84bbeeeced0615bbb9d9e4 (patch) | |
tree | 11e8a3d0a8f176aa7c1203beb713aa08b22f5959 /includes | |
parent | 099b76769f02432d8efcd7881348e5f5b6b50787 (diff) | |
download | haskell-7637810a93441d29bc84bbeeeced0615bbb9d9e4.tar.gz |
Trac #9878: Have StaticPointers support dynamic loading.
Summary:
A mutex is used to protect the SPT.
unsafeLookupStaticPtr and staticPtrKeys in GHC.StaticPtr are made
monadic.
SPT entries are removed in a destructor function of modules.
Authored-by: Facundo DomÃnguez <facundo.dominguez@tweag.io>
Authored-by: Alexander Vershilov <alexander.vershilov@tweag.io>
Test Plan: ./validate
Reviewers: austin, simonpj, hvr
Subscribers: carter, thomie, qnikst, mboes
Differential Revision: https://phabricator.haskell.org/D587
GHC Trac Issues: #9878
Diffstat (limited to 'includes')
-rw-r--r-- | includes/rts/StaticPtrTable.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/includes/rts/StaticPtrTable.h b/includes/rts/StaticPtrTable.h index 87a905c073..d863160342 100644 --- a/includes/rts/StaticPtrTable.h +++ b/includes/rts/StaticPtrTable.h @@ -28,4 +28,12 @@ * */ void hs_spt_insert (StgWord64 key[2],void* spe_closure); +/** Removes an entry from the Static Pointer Table. + * + * This function is called from the code generated by + * compiler/deSugar/StaticPtrTable.sptInitCode + * + * */ +void hs_spt_remove (StgWord64 key[2]); + #endif /* RTS_STATICPTRTABLE_H */ |