From: Chris Hanson Date: Fri, 1 Oct 2004 02:15:20 +0000 (+0000) Subject: Implement WITH-LIMITED-INTERRUPTS. X-Git-Tag: 20090517-FFI~1582 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=e0442a17aab06888584d546a15c2c42d07655a6a;p=mit-scheme.git Implement WITH-LIMITED-INTERRUPTS. --- diff --git a/v7/src/runtime/global.scm b/v7/src/runtime/global.scm index 73a454ea5..2b34a392e 100644 --- a/v7/src/runtime/global.scm +++ b/v7/src/runtime/global.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: global.scm,v 14.65 2004/10/01 01:52:52 cph Exp $ +$Id: global.scm,v 14.66 2004/10/01 02:14:55 cph Exp $ Copyright 1988,1989,1991,1992,1993,1995 Massachusetts Institute of Technology Copyright 1998,2000,2001,2003,2004 Massachusetts Institute of Technology @@ -113,6 +113,10 @@ USA. (define-integrable (system-hunk3-cons type cxr0 cxr1 cxr2) (object-new-type type (hunk3-cons cxr0 cxr1 cxr2))) +(define (with-limited-interrupts limit-mask procedure) + (with-interrupt-mask (fix:and limit-mask (get-interrupt-enables)) + procedure)) + (define (object-component-binder get-component set-component!) (lambda (object new-value thunk) (let ((old-value)) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 10a30f569..d529c3713 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.493 2004/10/01 01:53:10 cph Exp $ +$Id: runtime.pkg,v 14.494 2004/10/01 02:15:20 cph Exp $ Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology Copyright 1994,1995,1996,1997,1998,1999 Massachusetts Institute of Technology @@ -357,6 +357,7 @@ USA. wait-interval with-history-disabled with-interrupt-mask + with-limited-interrupts with-values write-to-string) (initialization (initialize-package!)))