Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] replace IS_TRACING by TRACE_is_active() function
[simgrid.git] / src / instr / instr_config.c
index 718c92c..e83bf2d 100644 (file)
 #define OPT_TRACING_PLATFORM_METHOD "tracing/platform/method"
 
 static int trace_configured = 0;
+static int trace_active = 0;
+
+void TRACE_activate (void)
+{
+  if (trace_active){
+    THROW0(tracing_error, TRACE_ERROR_ALREADY_ACTIVE,
+           "Tracing is already active.");
+  }
+  trace_active = 1;
+}
+
+void TRACE_desactivate (void)
+{
+  trace_active = 0;
+}
+
+int TRACE_is_active (void)
+{
+  return trace_active;
+}
 
 int TRACE_is_enabled(void)
 {