[pisa-src] r1631 - in trunk/libpisa: scheduler.c scheduler.h

  • From: Thomas Jansen <mithi@xxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Wed, 11 Nov 2009 11:53:17 +0100

Author: tjansen
Date: Wed Nov 11 11:53:17 2009
New Revision: 1631

Log:
Replaced timerclear by manual initialization.

First step towards -std=c99.

Modified:
   trunk/libpisa/scheduler.c
   trunk/libpisa/scheduler.h

Modified: trunk/libpisa/scheduler.c
==============================================================================
--- trunk/libpisa/scheduler.c   Tue Nov 10 20:36:56 2009        (r1630)
+++ trunk/libpisa/scheduler.c   Wed Nov 11 11:53:17 2009        (r1631)
@@ -23,12 +23,11 @@
 static void *pisa_sched_main(void *arg)
 {
        fd_set fds;
-       struct timeval timeout, now;
+       struct timeval timeout = {0, 0}, now;
        pisa_scheduler *sched = (pisa_scheduler *)arg;
 
        /* The first select call will return immediately, real initialization
         * is done after that. */
-       timerclear(&timeout);
 
        while (1) {
                FD_ZERO(&fds);

Modified: trunk/libpisa/scheduler.h
==============================================================================
--- trunk/libpisa/scheduler.h   Tue Nov 10 20:36:56 2009        (r1630)
+++ trunk/libpisa/scheduler.h   Wed Nov 11 11:53:17 2009        (r1631)
@@ -54,8 +54,7 @@
 
 static inline pisa_sched_task *pisa_sched_add_now(pisa_scheduler *sched, 
pisa_sched_func func, void *data)
 {
-       struct timeval delay;
-       timerclear(&delay);
+       struct timeval delay = {0, 0};
        return pisa_sched_add(sched, func, &delay, data);
 }
 

Other related posts:

  • » [pisa-src] r1631 - in trunk/libpisa: scheduler.c scheduler.h - Thomas Jansen