From 35edd17a9c1dcd71b92182bce9378eea321b0f37 Mon Sep 17 00:00:00 2001 From: Ashutosh Dixit Date: Fri, 1 Jul 2022 20:05:35 -0700 Subject: tests/drm_read: Fix -Wdeprecated-declarations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [1/405] Compiling C object tests/drm_read.p/drm_read.c.o ../tests/drm_read.c: In function ‘test_short_buffer_wakeup’: ../tests/drm_read.c:224:17: warning: ‘pthread_yield’ is deprecated: \ pthread_yield is deprecated, \ use sched_yield instead [-Wdeprecated-declarations] 224 | pthread_yield(); | ^~~~~~~~~~~~~ /usr/include/pthread.h:479:12: note: declared here 479 | extern int __REDIRECT_NTH (pthread_yield, (void), sched_yield) | ^~~~~~~~~~~~~~ Use sched_yield instead of pthread_yield Reviewed-by: Ville Syrjälä Signed-off-by: Ashutosh Dixit --- tests/drm_read.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/drm_read.c b/tests/drm_read.c index 3186e609..4a966a23 100644 --- a/tests/drm_read.c +++ b/tests/drm_read.c @@ -221,7 +221,7 @@ static void test_short_buffer_wakeup(int in, enum pipe pipe) pthread_mutex_unlock(&w.mutex); /* Give each thread a chance to sleep in drm_read() */ - pthread_yield(); + sched_yield(); /* One event should wake all threads as none consume */ generate_event(w.fd, pipe); -- cgit v1.2.3