Skip to content

Commit bac0b13

Browse files
Andrew JonesMarc Zyngier
authored andcommitted
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 <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 80d9ac9 commit bac0b13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/kvm/steal_time.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ int main(int ac, char **av)
320320
run_delay = get_run_delay();
321321
pthread_create(&thread, &attr, do_steal_time, NULL);
322322
do
323-
pthread_yield();
323+
sched_yield();
324324
while (get_run_delay() - run_delay < MIN_RUN_DELAY_NS);
325325
pthread_join(thread, NULL);
326326
run_delay = get_run_delay() - run_delay;

0 commit comments

Comments
 (0)