Commit 658f7ac6 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

includes: Avoid using single-line comments in HsFFI.h

While single-line comments are supported by C99, dtrace on SmartOS
apparently doesn't support them yet.
parent dfdae56d
Pipeline #15563 passed with stages
in 605 minutes and 54 seconds
......@@ -9,6 +9,10 @@
*
* ---------------------------------------------------------------------------*/
/* N.B. Only use C-style multi-line comments in this file to avoid upsetting
* dtrace on SmartOS, which doesn't support C++-style single-line comments.
*/
#pragma once
#if defined(__cplusplus)
......@@ -101,26 +105,28 @@ 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.
/* 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.
/* A deprecated synonym. */
extern void hs_lock_stable_tables (void);
// Unlock the stable pointer table.
/* Unlock the stable pointer table. */
extern void hs_unlock_stable_ptr_table (void);
// A deprecated synonym.
/* A deprecated synonym. */
extern void hs_unlock_stable_tables (void);
// Free a stable pointer assuming that the stable pointer
// table is already locked.
/* 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);
......
......@@ -193,9 +193,11 @@ typedef StgWord8* StgByteArray;
typedef void *(*(*StgFunPtr)(void))(void);
typedef StgFunPtr StgFun(void);
// Forward declarations for the unregisterised backend, which
// only depends upon Stg.h and not the entirety of Rts.h, which
// is where these are defined.
/*
* Forward declarations for the unregisterised backend, which
* only depends upon Stg.h and not the entirety of Rts.h, which
* is where these are defined.
*/
struct StgClosure_;
struct StgThunk_;
struct Capability_;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment