(lwpProc): Change type of member runtime to time_t.
(lwpSleepUntil): Change type of parameter to time_t.
This commit is contained in:
parent
8e6300b620
commit
e501656b4a
3 changed files with 6 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue