Use recursive mutex for side
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 30 Oct 2022 18:31:29 +0000 (14:31 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 30 Oct 2022 18:31:29 +0000 (14:31 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/side.c

index 9d86ed9ec424b954184146b68205197333a4fcb2..16dc2fbf99f9ad3e9331592138d0661a34135136 100644 (file)
@@ -49,7 +49,10 @@ static bool initialized;
  */
 static bool finalized;
 
-static pthread_mutex_t side_lock = PTHREAD_MUTEX_INITIALIZER;
+/*
+ * Recursive mutex to allow tracer callbacks to use the side API.
+ */
+static pthread_mutex_t side_lock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
 
 static DEFINE_SIDE_LIST_HEAD(side_events_list);
 static DEFINE_SIDE_LIST_HEAD(side_tracer_list);
This page took 0.024177 seconds and 4 git commands to generate.