]> git.pond.sub.org Git - empserver/blobdiff - include/lwp.h
lwp: Simplify lwpSigWait() interface
[empserver] / include / lwp.h
index a793fcb7dbfc6f701a7038fad4ea552790c0fde0..23033f3b67d2142d44507a556f33f95cb2c82910 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1994-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1994-2020, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *  Copyright (C) 1991-3 Stephen Crane
  *
@@ -28,7 +28,7 @@
  *  lwp.h -- prototypes and structures for lightweight processes
  *
  *  Known contributors to this file:
- *     Markus Armbruster, 2004-2010
+ *     Markus Armbruster, 2004-2020
  *     Ron Koenderink, 2007-2009
  */
 
@@ -41,8 +41,7 @@
 #ifndef LWP_H
 #define LWP_H
 
-#include <signal.h>
-#include <sys/types.h>
+#include <sys/time.h>
 
 #define LWP_STACKCHECK 0x1
 #define LWP_PRINT      0x2
@@ -55,7 +54,7 @@ struct lwp_rwlock;
 
 #define LWP_MAX_PRIO   8
 
-struct lwpProc *lwpInitSystem(int prio, void **ctxp, int flags, sigset_t *);
+struct lwpProc *lwpInitSystem(int prio, void **ctxp, int flags, int[]);
 struct lwpProc *lwpCreate(int prio, void (*)(void *), int size,
                          int flags, char *name,
                          int argc, char **argv, void *ud);
@@ -65,7 +64,7 @@ void lwpYield(void);
 int lwpSleepFd(int fd, int flags, struct timeval *timeout);
 int lwpSleepUntil(time_t until);
 void lwpWakeup(struct lwpProc *);
-int lwpSigWait(sigset_t *set, int *sig);
+int lwpSigWait(void);
 void *lwpGetUD(struct lwpProc *);
 void lwpSetUD(struct lwpProc *, char *ud);
 int lwpSetPriority(int prio);