summaryrefslogtreecommitdiffstats
path: root/kernel/tools/perf/bench/futex-wake.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/tools/perf/bench/futex-wake.c')
-rw-r--r--kernel/tools/perf/bench/futex-wake.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/tools/perf/bench/futex-wake.c b/kernel/tools/perf/bench/futex-wake.c
index 929f762be..e5e41d3bd 100644
--- a/kernel/tools/perf/bench/futex-wake.c
+++ b/kernel/tools/perf/bench/futex-wake.c
@@ -60,7 +60,12 @@ static void *workerfn(void *arg __maybe_unused)
pthread_cond_wait(&thread_worker, &thread_lock);
pthread_mutex_unlock(&thread_lock);
- futex_wait(&futex1, 0, NULL, futex_flag);
+ while (1) {
+ if (futex_wait(&futex1, 0, NULL, futex_flag) != EINTR)
+ break;
+ }
+
+ pthread_exit(NULL);
return NULL;
}