Commit 7cb514f42c8e1476f4a9730d1d2168f62b01212a

Thomas de Grivel 2023-07-16T10:22:59

facts

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/libc3/facts.c b/libc3/facts.c
index 047d314..ece4824 100644
--- a/libc3/facts.c
+++ b/libc3/facts.c
@@ -364,7 +364,9 @@ void facts_lock_r (s_facts *facts)
 
 void facts_lock_unlock_r (s_facts *facts)
 {
+  pthread_t thread;
   assert(facts);
+  thread = pthread_self();
   if (facts->rwlock_thread == thread)
     return;
   if (pthread_rwlock_unlock(&facts->rwlock))