public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] prio-wake: eliminate deprecated usleep calls
@ 2014-07-28 22:05 Gary S. Robertson
  2014-07-29 10:46 ` chrubis
  0 siblings, 1 reply; 3+ messages in thread
From: Gary S. Robertson @ 2014-07-28 22:05 UTC (permalink / raw)
  To: ltp-list; +Cc: mike.holmes

From: "Gary S. Robertson" <gary.robertson@linaro.org>

Replaced deprecated usleep calls with calls to rt_nanosleep,
which has no potentially adverse interactions with signals.

Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
---
 testcases/realtime/func/prio-wake/prio-wake.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/realtime/func/prio-wake/prio-wake.c b/testcases/realtime/func/prio-wake/prio-wake.c
index 18c0405..f34ae30 100644
--- a/testcases/realtime/func/prio-wake/prio-wake.c
+++ b/testcases/realtime/func/prio-wake/prio-wake.c
@@ -108,10 +108,10 @@ void *master_thread(void *arg)
 
 	/* make sure children are started */
 	while (running_threads < rt_threads)
-		usleep(1000);
+		rt_nanosleep(1000000);
 	/* give the worker threads a chance to get to sleep in the kernel
 	 * in the unlocked broadcast case. */
-	usleep(1000);
+	rt_nanosleep(1000000);
 
 	start = rt_gettime() - beginrun;
 
-- 
1.7.9.5


------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-29 18:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-28 22:05 [LTP] [PATCH] prio-wake: eliminate deprecated usleep calls Gary S. Robertson
2014-07-29 10:46 ` chrubis
     [not found]   ` <CAF7YWnxyXT2V=yKmEoSUzTbX8Cn9jVPTOK9-2sn_2jZCBOx_Gg@mail.gmail.com>
2014-07-29 18:16     ` chrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox