Interruptible FFI calls with pthread_kill and CancelSynchronousIO. v4
[ghc-hetmet.git] / includes / rts / prof / CCS.h
index 3512930..b210991 100644 (file)
@@ -1,14 +1,22 @@
 /* -----------------------------------------------------------------------------
  *
- * (c) The GHC Team, 2004
+ * (c) The GHC Team, 2009
  *
  * Macros for profiling operations in STG code
  *
+ * Do not #include this file directly: #include "Rts.h" instead.
+ *
+ * To understand the structure of the RTS headers, see the wiki:
+ *   http://hackage.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes
+ *
  * ---------------------------------------------------------------------------*/
 
 #ifndef RTS_PROF_CCS_H
 #define RTS_PROF_CCS_H
 
+// Returns non-zero if the RTS is a profiling version
+int rts_isProfiled(void);
+
 /* -----------------------------------------------------------------------------
  * Data Structures 
  * ---------------------------------------------------------------------------*/  
@@ -176,7 +184,6 @@ extern CostCentreStack * RTS_VAR(CCS_LIST);         /* registered CCS list */
 
 #define REGISTER_CC(cc)                                        \
        do {                                            \
-       extern CostCentre cc[];                         \
        if ((cc)->link == (CostCentre *)0) {            \
            (cc)->link = CC_LIST;                       \
            CC_LIST = (cc);                             \
@@ -185,7 +192,6 @@ extern CostCentreStack * RTS_VAR(CCS_LIST);         /* registered CCS list */
 
 #define REGISTER_CCS(ccs)                              \
        do {                                            \
-       extern CostCentreStack ccs[];                   \
         if ((ccs)->prevStack == (CostCentreStack *)0) {        \
          (ccs)->prevStack = CCS_LIST;                  \
          CCS_LIST = (ccs);                             \