Skip to content

Commit 408a23d

Browse files
Remove code making lock acquisition order inconsistent
This fixes the following Coverity issue: ``` lib/acl_threadsupport/src/acl_threadsupport.c:411:5: Type: Thread deadlock (ORDER_REVERSAL) ```
1 parent dd7c2cd commit 408a23d

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

lib/acl_threadsupport/src/acl_threadsupport.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -421,13 +421,6 @@ int acl_timed_wait_condvar(struct acl_condvar_s *C, unsigned timeout_period) {
421421
// Switch groups.
422422
C->entry_q = 1 - C->entry_q;
423423

424-
// Before exiting, lower signal if it was sent between timeout_period and
425-
// now
426-
if (timed_out) {
427-
if (!acl_sem_trywait(&C->signal_sem)) {
428-
timed_out = 0;
429-
}
430-
}
431424
C->timedout[my_entry_q] = timed_out;
432425

433426
l_dump("Wake end");

0 commit comments

Comments
 (0)