summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-02-05 16:16:38 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-02-08 10:26:00 -0500
commit658f7ac67472a880e19397773edd35a6214ed995 (patch)
tree86318c8a25e36a5ca59e5bee67552469035b6149
parentdfdae56d2ea9b9841e747c36cdff63a826045805 (diff)
downloadhaskell-658f7ac67472a880e19397773edd35a6214ed995.tar.gz
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.
-rw-r--r--includes/HsFFI.h30
-rw-r--r--includes/stg/Types.h8
2 files changed, 23 insertions, 15 deletions
diff --git a/includes/HsFFI.h b/includes/HsFFI.h
index d021e6fb42..d9812604d4 100644
--- a/includes/HsFFI.h
+++ b/includes/HsFFI.h
@@ -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);
diff --git a/includes/stg/Types.h b/includes/stg/Types.h
index 8ce9e3c156..b9bb48228c 100644
--- a/includes/stg/Types.h
+++ b/includes/stg/Types.h
@@ -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_;