diff options
author | Simon Marlow <marlowsd@gmail.com> | 2013-02-14 08:46:55 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2013-02-14 10:56:58 +0000 |
commit | 7e7a4e4d7e9e84b2c57d3d55e372e738b5f8dbf5 (patch) | |
tree | b5ab2b56418c09f01275970cc7d4e6629b0e7b43 /rts/HsFFI.c | |
parent | 65a0e1eb88fb48d085f8da498a7acc2fd345c2a8 (diff) | |
download | haskell-7e7a4e4d7e9e84b2c57d3d55e372e738b5f8dbf5.tar.gz |
Separate StablePtr and StableName tables (#7674)
To improve performance of StablePtr.
Diffstat (limited to 'rts/HsFFI.c')
-rw-r--r-- | rts/HsFFI.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/rts/HsFFI.c b/rts/HsFFI.c index 38a520da00..856536f5aa 100644 --- a/rts/HsFFI.c +++ b/rts/HsFFI.c @@ -27,6 +27,16 @@ hs_perform_gc(void) performMajorGC(); } +void hs_lock_stable_tables (void) +{ + stableLock(); +} + +void hs_unlock_stable_tables (void) +{ + stableUnlock(); +} + void hs_free_stable_ptr(HsStablePtr sp) { @@ -36,6 +46,14 @@ hs_free_stable_ptr(HsStablePtr sp) } void +hs_free_stable_ptr_unsafe(HsStablePtr sp) +{ + /* The cast is for clarity only, both HsStablePtr and StgStablePtr are + typedefs for void*. */ + freeStablePtrUnsafe((StgStablePtr)sp); +} + +void hs_free_fun_ptr(HsFunPtr fp) { /* I simply *love* all these similar names... */ |