]> git.pond.sub.org Git - empserver/commitdiff
(lwpCreate): Initialize members runtime and fd. Initializing fd is
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 28 Jan 2007 14:34:34 +0000 (14:34 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 28 Jan 2007 14:34:34 +0000 (14:34 +0000)
necessary to make lwpWakeupFd() work reliably.  Initializing runtime
isn't strictly necessary, as it is used only while the thread is on
LwpDelayq, and putting it there sets runtime.

src/lib/lwp/lwp.c

index a67ab678a2977831b6d1a7556318d71fa91cb81d..3dcae1e7dc9e0601fd0916f911e991db9c60ff31 100644 (file)
@@ -145,6 +145,8 @@ lwpCreate(int priority, void (*entry)(void *), int stacksz, int flags, char *nam
     newp->argv = argv;
     newp->ud = ud;
     newp->dead = 0;
+    newp->runtime = -1;
+    newp->fd = -1;
     if (LWP_MAX_PRIO <= priority)
        priority = LWP_MAX_PRIO - 1;
     if (LwpMaxpri < (newp->pri = priority))