source: project/release/4/synch/trunk/critical-region.scm @ 35566

Last change on this file since 35566 was 35566, checked in by Kon Lovett, 2 years ago

ns pollution badge

File size: 501 bytes
Line 
1;;;; critical-region.scm
2;;;; Kon Lovett, Feb '18
3
4;; Issues
5;;
6
7(module critical-region
8
9(;export
10  critical-region
11  critical-region-call
12  critical-region-apply )
13
14(import scheme chicken)
15
16(declare (disable-interrupts))
17
18;;;
19
20(define-syntax critical-region
21        (syntax-rules ()
22    ((_ body ...)
23      (critical-region-call (lambda () body ...)) ) ) )
24
25(define (critical-region-apply proc . rest)
26  (apply proc rest) )
27
28(define (critical-region-call thunk)
29  (thunk) )
30
31;;;
32
33) ;module critical-region
Note: See TracBrowser for help on using the repository browser.