diff options
Diffstat (limited to 'includes/HsFFI.h')
-rw-r--r-- | includes/HsFFI.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/includes/HsFFI.h b/includes/HsFFI.h index dea365cb65..84976474f5 100644 --- a/includes/HsFFI.h +++ b/includes/HsFFI.h @@ -101,8 +101,26 @@ extern void hs_thread_done (void); extern void hs_perform_gc (void); +// Lock the stable pointer table. The table must be unlocked +// again before calling any Haskell functions, even if those +// functions do not manipulate stable pointers. The Haskell +// garbage collector will not be able to run until this lock +// is released! It is also forbidden to call hs_free_fun_ptr +// or any stable pointer-related FFI functions other than +// hs_free_stable_ptr_unsafe while the table is locked. +extern void hs_lock_stable_ptr_table (void); + +// A deprecated synonym. extern void hs_lock_stable_tables (void); + +// Unlock the stable pointer table. +extern void hs_unlock_stable_ptr_table (void); + +// A deprecated synonym. extern void hs_unlock_stable_tables (void); + +// Free a stable pointer assuming that the stable pointer +// table is already locked. extern void hs_free_stable_ptr_unsafe (HsStablePtr sp); extern void hs_free_stable_ptr (HsStablePtr sp); |