Save "block-thread-events" flag in continuations. This guarantees
authorChris Hanson <org/chris-hanson/cph>
Wed, 24 Feb 1999 04:44:04 +0000 (04:44 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 24 Feb 1999 04:44:04 +0000 (04:44 +0000)
that it will be properly stored no matter where the continuation is
captured.

v7/src/runtime/contin.scm
v7/src/runtime/runtime.pkg
v7/src/runtime/thread.scm
v8/src/runtime/runtime.pkg

index 01c96d028659f881865c4187eb07fc684f7f8b67..014d8f4ebdbf896a1cb4952d33e070176bbf9480 100644 (file)
@@ -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)
index 7fa0830b386b4563a8b47192d5c900e19b98da9f..289982d085269ea629825cff81fa2a3bedf443cd 100644 (file)
@@ -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)
index 198f94dee6b36acb3699595b6bcbde87ef378478..f80a88ea86b37ce83b9d5d1ec4f1436a541d1d1d 100644 (file)
@@ -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)
index cd1ca13ec80d6a9653a898a68b0ee02bb614a0c7..7bac3ac02aeefcc3b588ba0abe03f48307cd81bc 100644 (file)
@@ -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)