* significantly more enjoyable.)
*/
#ifndef lint
-static const char rcsid[] = "$Id: os_win32.c,v 1.22 2001/09/04 18:44:11 robs Exp $";
+static const char rcsid[] = "$Id: os_win32.c,v 1.23 2001/09/06 20:08:33 robs Exp $";
#endif /* not lint */
#define WIN32_LEAN_AND_MEAN
static HANDLE acceptMutex = INVALID_HANDLE_VALUE;
static BOOLEAN shutdownPending = FALSE;
+static BOOLEAN shutdownNow = FALSE;
/*
* An enumeration of the file types
ExitThread(0);
}
+void OS_Shutdown(void)
+{
+ shutdownNow = TRUE;
+ OS_ShutdownPending();
+}
+
+void OS_ShutdownPending(void)
+{
+ shutdownPending = TRUE;
+}
+
+/* XXX Need a shutdown now event */
static DWORD WINAPI ShutdownRequestThread(LPVOID arg)
{
HANDLE shutdownEvent = (HANDLE) arg;
ASSERT((fd >= 0) && (fd < WIN32_OPEN_MAX));
+ if (shutdownNow) return -1;
+
switch (fdTable[fd].type)
{
case FD_FILE_SYNC:
ASSERT(fd >= 0 && fd < WIN32_OPEN_MAX);
+ if (shutdownNow) return -1;
+
switch (fdTable[fd].type)
{
case FD_FILE_SYNC: