/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1994-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1994-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
* Copyright (C) 1991-3 Stephen Crane
*
* ---
*
* lwpint.h: lwp internal structures
- *
+ *
* Known contributors to this file:
- * Markus Armbruster, 2004-2007
+ * Markus Armbruster, 2004-2009
*/
#ifndef LWPINT_H
#define LWPINT_H
#include <signal.h>
+#include <time.h>
#include <ucontext.h>
#include "misc.h"
int pri; /* which scheduling queue we're on */
time_t runtime; /* time at which process is restarted */
int fd; /* fd we're blocking on */
+ int fd_ready; /* woken up because fd was ready */
int argc; /* initial arguments */
char **argv;
void *ud; /* user data */
/* XXX Note that this assumes sizeof(int) == 4 */
#define LWP_CHECKMARK 0x5a5a5a5a
-extern int LwpStackGrowsDown;
-
-int lwpNewContext(struct lwpProc *, int);
+int lwpNewContext(struct lwpProc *);
void lwpSwitchContext(struct lwpProc *, struct lwpProc *);
void lwpAddTail(struct lwpQueue *, struct lwpProc *);
struct lwpProc *lwpGetFirst(struct lwpQueue *);