Commit 86f2671b authored by Simon Marlow's avatar Simon Marlow
Browse files

fix up Win32 build

parent f83d5d07
...@@ -219,7 +219,7 @@ start: ...@@ -219,7 +219,7 @@ start:
if (completed_hw == 0) { if (completed_hw == 0) {
/* empty table, drop lock and wait */ /* empty table, drop lock and wait */
LeaveCriticalSection(&queue_lock); LeaveCriticalSection(&queue_lock);
if ( wait && !interrupted ) { if ( wait && sched_state == SCHED_RUNNING ) {
DWORD dwRes = WaitForMultipleObjects(2, wait_handles, FALSE, INFINITE); DWORD dwRes = WaitForMultipleObjects(2, wait_handles, FALSE, INFINITE);
switch (dwRes) { switch (dwRes) {
case WAIT_OBJECT_0: case WAIT_OBJECT_0:
......
...@@ -70,7 +70,7 @@ static BOOL WINAPI shutdown_handler(DWORD dwCtrlType) ...@@ -70,7 +70,7 @@ static BOOL WINAPI shutdown_handler(DWORD dwCtrlType)
// If we're already trying to interrupt the RTS, terminate with // If we're already trying to interrupt the RTS, terminate with
// extreme prejudice. So the first ^C tries to exit the program // extreme prejudice. So the first ^C tries to exit the program
// cleanly, and the second one just kills it. // cleanly, and the second one just kills it.
if (interrupted) { if (sched_state >= SCHED_INTERRUPTING) {
stg_exit(EXIT_INTERRUPTED); stg_exit(EXIT_INTERRUPTED);
} else { } else {
interruptStgRts(); interruptStgRts();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment