]> git.pond.sub.org Git - empserver/commitdiff
(lwpProc): Change type of member runtime to time_t.
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 28 Jan 2007 14:14:40 +0000 (14:14 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 28 Jan 2007 14:14:40 +0000 (14:14 +0000)
(lwpSleepUntil): Change type of parameter to time_t.

include/lwp.h
src/lib/lwp/lwpint.h
src/lib/lwp/sel.c

index 6fccd58401832857197efdca1af69010dcb62628..00feba7c2f1ab82bb839eda26ae184a5cba60e5d 100644 (file)
@@ -25,6 +25,7 @@
 #define LWP_H
 
 #include <signal.h>
+#include <time.h>
 
 #define LWP_STACKCHECK 0x1
 #define LWP_PRINT      0x2
@@ -46,7 +47,7 @@ void lwpExit(void);
 void lwpTerminate(struct lwpProc * p);
 void lwpYield(void);
 void lwpSleepFd(int fd, int flags);
-void lwpSleepUntil(long until);
+void lwpSleepUntil(time_t until);
 void lwpWakeupFd(struct lwpProc * p);
 int lwpSigWait(sigset_t *set, int *sig);
 void *lwpGetUD(struct lwpProc * p);
index 5fd2535078f620fa4dc53ea242f6b588f7960948..c0ba999703680cfa0fab3b7797bca40325491ac0 100644 (file)
@@ -58,7 +58,7 @@ struct lwpProc {
     void (*entry)(void *);     /* entry point */
     int dead;                  /* whether the process can be rescheduled */
     int pri;                   /* which scheduling queue we're on */
-    long runtime;              /* time at which process is restarted */
+    time_t runtime;            /* time at which process is restarted */
     int fd;                    /* fd we're blocking on */
     int argc;                  /* initial arguments */
     char **argv;
index 1d1b12adabdbd507b20bc287a11b78536822d5d6..77dea0386acde077fdfca3a27cb90b73f0f3c632 100644 (file)
@@ -123,9 +123,10 @@ lwpWakeupFd(struct lwpProc *proc)
 }
 
 void
-lwpSleepUntil(long until)
+lwpSleepUntil(time_t until)
 {
-    lwpStatus(LwpCurrent, "sleeping for %ld sec", until - time(0));
+    lwpStatus(LwpCurrent, "sleeping for %ld sec",
+             (long)(until - time(NULL)));
     LwpCurrent->runtime = until;
     if (LwpMaxfd == 0 && LwpDelayq.head == 0) {
        /* select process is sleeping until first waiter arrives */