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

Last change on this file since 35162 was 35162, checked in by Kon Lovett, 3 years ago

add critical-region , add synchornized procedure

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 critical-region-call)
11  critical-region-apply )
12
13(import scheme chicken)
14
15(declare (disable-interrupts))
16
17;;;
18
19(define-syntax critical-region
20        (syntax-rules ()
21    ((_ body ...)
22      (critical-region-call (lambda () body ...)) ) ) )
23
24(define (critical-region-apply proc . rest)
25  (apply proc rest) )
26
27(define (critical-region-call thunk)
28  (thunk) )
29
30;;;
31
32) ;module critical-region
Note: See TracBrowser for help on using the repository browser.