From: Chris Hanson Date: Wed, 24 Feb 1999 04:44:04 +0000 (+0000) Subject: Save "block-thread-events" flag in continuations. This guarantees X-Git-Tag: 20090517-FFI~4608 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=3add02d6a95351106e8a2560d928d7d8d61ad7fc;p=mit-scheme.git Save "block-thread-events" flag in continuations. This guarantees that it will be properly stored no matter where the continuation is captured. --- diff --git a/v7/src/runtime/contin.scm b/v7/src/runtime/contin.scm index 01c96d028..014d8f4eb 100644 --- a/v7/src/runtime/contin.scm +++ b/v7/src/runtime/contin.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: contin.scm,v 14.9 1999/02/24 04:40:59 cph Exp $ +$Id: contin.scm,v 14.10 1999/02/24 04:44:04 cph Exp $ Copyright (c) 1988-1999 Massachusetts Institute of Technology @@ -158,6 +158,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (define-integrable (continuation/dynamic-state continuation) (%continuation/dynamic-state (entity-extra continuation))) +(define-integrable (continuation/block-thread-events? continuation) + (%continuation/block-thread-events? (entity-extra continuation))) + (define-structure (%continuation (constructor make-%continuation) (conc-name %continuation/)) (control-point #f read-only #t) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 7fa0830b3..289982d08 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.316 1999/02/23 21:31:53 cph Exp $ +$Id: runtime.pkg,v 14.317 1999/02/24 04:41:22 cph Exp $ Copyright (c) 1988-1999 Massachusetts Institute of Technology @@ -3230,6 +3230,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. thread-timer-interrupt-handler) (export (runtime primitive-io) block-on-input-descriptor) + (export (runtime continuation) + get-thread-event-block + set-thread-event-block!) (initialization (initialize-package!))) (define-package (runtime rb-tree) diff --git a/v7/src/runtime/thread.scm b/v7/src/runtime/thread.scm index 198f94dee..f80a88ea8 100644 --- a/v7/src/runtime/thread.scm +++ b/v7/src/runtime/thread.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: thread.scm,v 1.26 1999/02/24 04:41:06 cph Exp $ +$Id: thread.scm,v 1.27 1999/02/24 04:43:19 cph Exp $ Copyright (c) 1991-1999 Massachusetts Institute of Technology @@ -239,7 +239,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (maybe-signal-input-thread-events) (let ((any-events? (handle-thread-events thread))) (set-thread/block-events?! thread block-events?) - (if (not events?) + (if (not any-events?) (call-with-current-continuation (lambda (continuation) (set-thread/continuation! thread continuation) @@ -656,7 +656,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (lambda () (let ((thread first-running-thread)) (if thread - (set-thread/block-events? thread block?))))))) + (set-thread/block-events?! thread block?))))))) (define (signal-thread-event thread event) (guarantee-thread thread signal-thread-event) diff --git a/v8/src/runtime/runtime.pkg b/v8/src/runtime/runtime.pkg index cd1ca13ec..7bac3ac02 100644 --- a/v8/src/runtime/runtime.pkg +++ b/v8/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.321 1999/02/23 21:31:59 cph Exp $ +$Id: runtime.pkg,v 14.322 1999/02/24 04:41:10 cph Exp $ Copyright (c) 1988-1999 Massachusetts Institute of Technology @@ -3234,6 +3234,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. thread-timer-interrupt-handler) (export (runtime primitive-io) block-on-input-descriptor) + (export (runtime continuation) + get-thread-event-block + set-thread-event-block!) (initialization (initialize-package!))) (define-package (runtime rb-tree)