summaryrefslogtreecommitdiff
path: root/rts/Sanity.h
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-08-05 10:21:59 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-08-05 10:21:59 +0000
commit7d7c187b4a12f1bb350e85cdb0115e19537cc704 (patch)
tree2bfcb2d4e6ebacce3e80dd8fa454452aa76c0049 /rts/Sanity.h
parentacdd7c95066cf6505a4d2e8683f119146805af91 (diff)
downloadhaskell-7d7c187b4a12f1bb350e85cdb0115e19537cc704.tar.gz
Declare RTS-private prototypes with __attribute__((visibility("hidden")))
This has no effect with static libraries, but when the RTS is in a shared library it does two things: - it prevents the function from being exposed by the shared library - internal calls to the function can use the faster non-PLT calls, because the function cannot be overriden at link time.
Diffstat (limited to 'rts/Sanity.h')
-rw-r--r--rts/Sanity.h35
1 files changed, 18 insertions, 17 deletions
diff --git a/rts/Sanity.h b/rts/Sanity.h
index 3020246a70..f27c395c44 100644
--- a/rts/Sanity.h
+++ b/rts/Sanity.h
@@ -11,6 +11,8 @@
#ifdef DEBUG
+#pragma GCC visibility push(hidden)
+
# if defined(PAR)
# define PVM_PE_MASK 0xfffc0000
# define MAX_PVM_PES MAX_PES
@@ -19,23 +21,22 @@
# endif
/* debugging routines */
-extern void checkHeap ( bdescr *bd );
-extern void checkHeapChunk ( StgPtr start, StgPtr end );
-extern void checkLargeObjects ( bdescr *bd );
-extern void checkTSO ( StgTSO* tso );
-extern void checkGlobalTSOList ( rtsBool checkTSOs );
-extern void checkStaticObjects ( StgClosure* static_objects );
-extern void checkStackChunk ( StgPtr sp, StgPtr stack_end );
-extern StgOffset checkStackFrame ( StgPtr sp );
-extern StgOffset checkClosure ( StgClosure* p );
-
-extern void checkMutableList ( bdescr *bd, nat gen );
-extern void checkMutableLists ( rtsBool checkTSOs );
-
-extern void checkBQ (StgTSO *bqe, StgClosure *closure);
-
-/* test whether an object is already on update list */
-extern rtsBool isBlackhole( StgTSO* tso, StgClosure* p );
+void checkHeap ( bdescr *bd );
+void checkHeapChunk ( StgPtr start, StgPtr end );
+void checkLargeObjects ( bdescr *bd );
+void checkTSO ( StgTSO* tso );
+void checkGlobalTSOList ( rtsBool checkTSOs );
+void checkStaticObjects ( StgClosure* static_objects );
+void checkStackChunk ( StgPtr sp, StgPtr stack_end );
+StgOffset checkStackFrame ( StgPtr sp );
+StgOffset checkClosure ( StgClosure* p );
+
+void checkMutableList ( bdescr *bd, nat gen );
+void checkMutableLists ( rtsBool checkTSOs );
+
+void checkBQ (StgTSO *bqe, StgClosure *closure);
+
+#pragma GCC visibility pop
#endif /* DEBUG */