]> git.pond.sub.org Git - empserver/blobdiff - src/lib/empthread/ntthread.c
Update copyright notice.
[empserver] / src / lib / empthread / ntthread.c
index 3942cbe6d0b8debc5a193b6ef2e8eec111d8a79d..c734a0cd36cadea8d2c43a041ab154f3f30c46f4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2007, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
 
 #include <config.h>
 
+#include <errno.h>
+#include <signal.h>
 #include <stdio.h>
 #include <sys/types.h>
-#include <signal.h>
-#include <errno.h>
 #include <time.h>
-#include "misc.h"
-#include "empthread.h"
-#include "prototypes.h"
-
 #define WIN32
 #include <winsock2.h>
 #undef NS_ALL
 #include <windows.h>
 #include <process.h>
+#include "misc.h"
+#include "empthread.h"
+#include "prototypes.h"
 
 #define loc_MIN_THREAD_STACK  16384
 
@@ -577,7 +576,7 @@ empth_sleep(time_t until)
 /************************
  * empth_request_shutdown
  *
- * This wakes up empth_wait_for_shutdown() so shutdown can proceed.
+ * This wakes up empth_wait_for_signal() so shutdown can proceed.
  * This is done by signalling hShutdownEvent.
  */
 void
@@ -587,8 +586,10 @@ empth_request_shutdown(void)
 }
 
 int
-empth_wait_for_shutdown(void)
+empth_wait_for_signal(void)
 {
+    loc_BlockThisThread();
+
     /* Get the MUTEX semaphore, wait the number of MS */
     WaitForSingleObject(hShutdownEvent, INFINITE);