From: Andre Noll Date: Thu, 21 Jul 2011 17:18:41 +0000 (+0200) Subject: sched: Use (0,0) as the timeval for a minimal delay. X-Git-Tag: v0.4.8~11^2~2 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=37ae4ca0d9fb24ee2a35ac3786bcd3d8a6272535 sched: Use (0,0) as the timeval for a minimal delay. The select(2) man page says: If both fields of the timeval structure are zero, then select() returns immediately. This is exactly what is desired for sched_min_delay(). --- diff --git a/sched.c b/sched.c index 8baed496..8648811d 100644 --- a/sched.c +++ b/sched.c @@ -258,8 +258,7 @@ char *get_task_list(void) */ void sched_min_delay(struct sched *s) { - s->select_timeout.tv_sec = 0; - s->select_timeout.tv_usec = 1; + s->select_timeout.tv_sec = s->select_timeout.tv_usec = 0; } /**