Commit d7541594fdd644f359b44b215528fd60aa12cd6a

Thomas de Grivel 2024-07-24T15:21:02

abort if pthread fails

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/libkc3/facts.c b/libkc3/facts.c
index efdc262..2326de5 100644
--- a/libkc3/facts.c
+++ b/libkc3/facts.c
@@ -454,6 +454,7 @@ s_facts * facts_lock_r (s_facts *facts)
       pthread_rwlock_rdlock(&facts->rwlock)) {
     err_puts("facts_lock_r: pthread_rwlock_rdlock");
     assert(! "facts_lock_r: pthread_rwlock_rdlock");
+    abort();
     return NULL;
   }
   return facts;
@@ -468,6 +469,7 @@ s_facts * facts_lock_unlock_r (s_facts *facts)
       pthread_rwlock_unlock(&facts->rwlock)) {
     err_puts("facts_lock_unlock_r: pthread_rwlock_unlock");
     assert(! "facts_lock_unlock_r: pthread_rwlock_unlock");
+    abort();
     return NULL;
   }
   return facts;