split audiod
[paraslash.git] / sched.c
diff --git a/sched.c b/sched.c
index 27d71f6..c5b2c5e 100644 (file)
--- a/sched.c
+++ b/sched.c
@@ -10,6 +10,9 @@
 struct list_head pre_select_list;
 struct list_head post_select_list;
 
+static struct timeval now_struct;
+struct timeval *now = &now_struct;
+
 static void sched_preselect(struct sched *s)
 {
        struct task *t, *tmp;
@@ -42,7 +45,7 @@ static void sched_post_select(struct sched *s)
 int sched(struct sched *s)
 {
 
-       gettimeofday(&s->now, NULL);
+       gettimeofday(now, NULL);
 again:
        FD_ZERO(&s->rfds);
        FD_ZERO(&s->wfds);
@@ -53,7 +56,7 @@ again:
                &s->wfds, &s->timeout);
        if (s->select_ret < 0)
                return s->select_ret;
-       gettimeofday(&s->now, NULL);
+       gettimeofday(now, NULL);
        sched_post_select(s);
        if (list_empty(&pre_select_list) && list_empty(&post_select_list))
                return 0;