summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-02-05 16:16:38 -0500
committerBen Gamari <ben@smart-cactus.org>2020-02-05 16:17:25 -0500
commit138dd2a15f582c9f0c66e22a222777438612dc9b (patch)
treec61d4bfd18e06f243a4b86dcde558b0d205844dc
parente8004e5d1e993363a89b0107380604c5bc02be6b (diff)
downloadhaskell-wip/fix-comments.tar.gz
includes: Avoid using single-line comments in HsFFI.hwip/fix-comments
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_;