From fe35ce1697e81285fb294a74810df9ed9d9e0010 Mon Sep 17 00:00:00 2001 From: lisphacker Date: Tue, 3 Apr 2007 15:54:48 +0000 Subject: [PATCH] 1.0.4.20: Win32 build fix * interrupt_handle_pending turned out to be required on win32. * whitespace damage. --- src/runtime/interrupt.c | 21 ++++++++++++++------- src/runtime/win32-os.c | 2 +- version.lisp-expr | 2 +- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/runtime/interrupt.c b/src/runtime/interrupt.c index 9ee4193..7c47183 100644 --- a/src/runtime/interrupt.c +++ b/src/runtime/interrupt.c @@ -406,14 +406,19 @@ interrupt_internal_error(os_context_t *context, boolean continuable) void interrupt_handle_pending(os_context_t *context) { -#ifdef LISP_FEATURE_WIN32 - /* Actually this part looks almost good to go for - * Windows too, but currently we never save anything - * on Windows, so ending up here would be pretty bad. */ - lose("Pending interrupts unimplemented on Windows."); -#else + /* There are three ways we can get here. First, if an interrupt + * occurs within pseudo-atomic, it will be deferred, and we'll + * trap to here at the end of the pseudo-atomic block. Second, if + * the GC (in alloc()) decides that a GC is required, it will set + * *GC-PENDING* and pseudo-atomic-interrupted, and alloc() is + * always called from within pseudo-atomic, and thus we end up + * here again. Third, when calling GC-ON or at the end of a + * WITHOUT-GCING, MAYBE-HANDLE-PENDING-GC will trap to here if + * there is a pending GC. */ + + /* Win32 only needs to handle the GC cases (for now?) */ + struct thread *thread = arch_os_get_current_thread(); - struct interrupt_data *data = thread->interrupt_data; FSHOW_SIGNAL((stderr, "/entering interrupt_handle_pending\n")); @@ -442,6 +447,7 @@ interrupt_handle_pending(os_context_t *context) check_blockables_blocked_or_lose(); } +#ifndef LISP_FEATURE_WIN32 /* we may be here only to do the gc stuff, if interrupts are * enabled run the pending handler */ if (!((SymbolValue(INTERRUPTS_ENABLED,thread) == NIL) || @@ -450,6 +456,7 @@ interrupt_handle_pending(os_context_t *context) (!foreign_function_call_active) && #endif arch_pseudo_atomic_atomic(context)))) { + struct interrupt_data *data = thread->interrupt_data; /* There may be no pending handler, because it was only a gc * that had to be executed or because pseudo atomic triggered diff --git a/src/runtime/win32-os.c b/src/runtime/win32-os.c index 394ed3e..1d9635f 100644 --- a/src/runtime/win32-os.c +++ b/src/runtime/win32-os.c @@ -341,7 +341,7 @@ handle_exception(EXCEPTION_RECORD *exception_record, } if (exception_record->ExceptionCode == EXCEPTION_BREAKPOINT) { - unsigned char trap; + unsigned char trap; /* This is just for info in case the monitor wants to print an * approximation. */ current_control_stack_pointer = diff --git a/version.lisp-expr b/version.lisp-expr index f72cdb6..b7bbeae 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.4.19" +"1.0.4.20" -- 1.7.10.4