summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAndrew Jones <drjones@redhat.com>2021-07-13 22:37:41 +0200
committerMarc Zyngier <maz@kernel.org>2021-07-14 11:55:18 +0100
commitbac0b135907855e9f8c032877c3df3c60885a08f (patch)
tree31684a63789ae4437e951133bdc14d945d45f55f /tools
parent80d9ac9bd7b9366c2a89d2716a397749299728e7 (diff)
KVM: selftests: change pthread_yield to sched_yield
With later GCC we get steal_time.c: In function ‘main’: steal_time.c:323:25: warning: ‘pthread_yield’ is deprecated: pthread_yield is deprecated, use sched_yield instead [-Wdeprecated-declarations] Let's follow the instructions and use sched_yield instead. Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20210713203742.29680-2-drjones@redhat.com
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/kvm/steal_time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/steal_time.c b/tools/testing/selftests/kvm/steal_time.c
index b0031f2d38fd..ecec30865a74 100644
--- a/tools/testing/selftests/kvm/steal_time.c
+++ b/tools/testing/selftests/kvm/steal_time.c
@@ -320,7 +320,7 @@ int main(int ac, char **av)
run_delay = get_run_delay();
pthread_create(&thread, &attr, do_steal_time, NULL);
do
- pthread_yield();
+ sched_yield();
while (get_run_delay() - run_delay < MIN_RUN_DELAY_NS);
pthread_join(thread, NULL);
run_delay = get_run_delay() - run_delay;