Skip to content

Commit

Permalink
Add missing synchronization edge
Browse files Browse the repository at this point in the history
  • Loading branch information
Keno authored and rocallahan committed Dec 14, 2024
1 parent 7087278 commit 8ebb533
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/test/x86/deferred_patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ static void handle_usr1(__attribute__((unused)) int sig) {
// rather than the futex one that we interrupted.
test_assert(1 == read(pipefds[0], &byte, 1));
futex = 2;
test_assert(1 == write(pipefds2[1], &byte, 1));
return;
}

Expand All @@ -104,6 +105,7 @@ static void *do_thread(void*) {
syscall(SYS_tkill, parent, SIGUSR1);
test_assert(1 == read(pipefds2[0], &byte, 1));
test_assert(1 == write(pipefds[1], &byte, 1));
test_assert(1 == read(pipefds2[0], &byte, 1));
futex_wait(2);
test_assert(futex == 3);
return NULL;
Expand Down Expand Up @@ -159,4 +161,4 @@ int main(void) {
atomic_puts("EXIT-SUCCESS");
return 77;
}
#endif
#endif

0 comments on commit 8ebb533

Please sign in to comment.