From 6b265e0b6cbf1ae5e7e215fa7c4f90aec074f436 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 17 Jul 2005 02:27:05 +0000 Subject: [PATCH] Fix bug: %WITHIN-CONTINUATION was being used in "thread.scm", and my last change broke the interface. --- v7/src/runtime/contin.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/v7/src/runtime/contin.scm b/v7/src/runtime/contin.scm index 95a4e1c75..33f9b697d 100644 --- a/v7/src/runtime/contin.scm +++ b/v7/src/runtime/contin.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: contin.scm,v 14.14 2005/07/16 03:44:12 cph Exp $ +$Id: contin.scm,v 14.15 2005/07/17 02:27:05 cph Exp $ Copyright 1988,1989,1991,1992,1999,2005 Massachusetts Institute of Technology @@ -35,23 +35,23 @@ USA. (make-continuation control-point (get-dynamic-state) (get-thread-event-block)))) - (%within-continuation k (lambda () (receiver k))))))) + (%within-continuation k #f (lambda () (receiver k))))))) (define (within-continuation k thunk) (guarantee-continuation k 'WITHIN-CONTINUATION) - (%within-continuation k thunk)) + (%within-continuation k #f thunk)) (define (make-continuation control-point dynamic-state block-thread-events?) - (make-entity (lambda (k value) (%within-continuation k (lambda () value))) + (make-entity (lambda (k value) (%within-continuation k #f (lambda () value))) (make-%continuation control-point dynamic-state block-thread-events?))) -(define-integrable (%within-continuation k thunk) +(define (%within-continuation k thread-switch? thunk) ((ucode-primitive within-control-point 2) (continuation/control-point k) (lambda () - (set-dynamic-state! (continuation/dynamic-state k) #f) + (set-dynamic-state! (continuation/dynamic-state k) thread-switch?) (set-thread-event-block! (continuation/block-thread-events? k)) (thunk)))) -- 2.25.1