Commit cb7e7f82ff1d89f6689374985722f01838ec375c

Thomas de Grivel 2023-07-16T10:07:17

pthread ?

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