Opened threads-internal only for access and replaced runn by run again.
This commit is contained in:
parent
ea5725436e
commit
b79df3d6c1
|
@ -328,8 +328,8 @@
|
||||||
wait/poll
|
wait/poll
|
||||||
wait/stopped-children
|
wait/stopped-children
|
||||||
|
|
||||||
sleep
|
;sleep
|
||||||
sleep-until
|
;sleep-until
|
||||||
|
|
||||||
call-terminally
|
call-terminally
|
||||||
halts?))
|
halts?))
|
||||||
|
@ -532,7 +532,7 @@
|
||||||
|
|
||||||
|
|
||||||
(define-interface scsh-high-level-process-interface
|
(define-interface scsh-high-level-process-interface
|
||||||
(export (runn :syntax)
|
(export (run :syntax)
|
||||||
(exec-epf :syntax)
|
(exec-epf :syntax)
|
||||||
(& :syntax)
|
(& :syntax)
|
||||||
(|| :syntax)
|
(|| :syntax)
|
||||||
|
@ -1148,3 +1148,7 @@
|
||||||
interrupt/winch
|
interrupt/winch
|
||||||
interrupt/xcpu
|
interrupt/xcpu
|
||||||
interrupt/xfsz))
|
interrupt/xfsz))
|
||||||
|
|
||||||
|
(define-interface locks-interface
|
||||||
|
(export obtain-lock
|
||||||
|
release-lock))
|
|
@ -192,7 +192,7 @@
|
||||||
channels channel-i/o
|
channels channel-i/o
|
||||||
low-channels
|
low-channels
|
||||||
byte-vectors
|
byte-vectors
|
||||||
threads threads-internal locks placeholders
|
threads locks placeholders
|
||||||
primitives
|
primitives
|
||||||
escapes
|
escapes
|
||||||
command-levels
|
command-levels
|
||||||
|
@ -205,6 +205,7 @@
|
||||||
escapes
|
escapes
|
||||||
i/o ; S48's force-output
|
i/o ; S48's force-output
|
||||||
formats
|
formats
|
||||||
|
threads-internal
|
||||||
records ; I don't think this is necessary. !!!
|
records ; I don't think this is necessary. !!!
|
||||||
scheme) ; For accessing the normal I/O operators.
|
scheme) ; For accessing the normal I/O operators.
|
||||||
(files syntax
|
(files syntax
|
||||||
|
|
|
@ -523,7 +523,7 @@
|
||||||
|
|
||||||
;; In a subprocess, close the read ports, redirect input from
|
;; In a subprocess, close the read ports, redirect input from
|
||||||
;; the write ports, and run THUNK.
|
;; the write ports, and run THUNK.
|
||||||
(status (runn (begin (for-each close-input-port read-ports)
|
(status (run (begin (for-each close-input-port read-ports)
|
||||||
(for-each move->fdes write-ports fds)
|
(for-each move->fdes write-ports fds)
|
||||||
(thunk)))))
|
(thunk)))))
|
||||||
|
|
||||||
|
@ -599,7 +599,7 @@
|
||||||
|
|
||||||
(define (run/file* thunk)
|
(define (run/file* thunk)
|
||||||
(let ((fname (create-temp-file)))
|
(let ((fname (create-temp-file)))
|
||||||
(runn (begin (thunk)) (> ,fname))
|
(run (begin (thunk)) (> ,fname))
|
||||||
fname))
|
fname))
|
||||||
|
|
||||||
(define (run/string* thunk)
|
(define (run/string* thunk)
|
||||||
|
|
|
@ -355,9 +355,12 @@
|
||||||
|
|
||||||
(set-interrupt-handler interrupt/keyboard
|
(set-interrupt-handler interrupt/keyboard
|
||||||
(lambda stuff
|
(lambda stuff
|
||||||
(schedule-event scheduler-initial-thread
|
((structure-ref threads-internal schedule-event)
|
||||||
(enum event-type interrupt)
|
scheduler-initial-thread
|
||||||
(enum interrupt keyboard))))))
|
(enum
|
||||||
|
(structure-ref threads-internal event-type)
|
||||||
|
interrupt)
|
||||||
|
(enum interrupt keyboard))))))
|
||||||
|
|
||||||
;;; I am ashamed to say the 33 below is completely bogus.
|
;;; I am ashamed to say the 33 below is completely bogus.
|
||||||
;;; What we want is a value that is 1 + max interrupt value.
|
;;; What we want is a value that is 1 + max interrupt value.
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
(define-simple-syntax (& . epf)
|
(define-simple-syntax (& . epf)
|
||||||
(fork (lambda () (exec-epf . epf))))
|
(fork (lambda () (exec-epf . epf))))
|
||||||
|
|
||||||
(define-simple-syntax (runn . epf)
|
(define-simple-syntax (run . epf)
|
||||||
(wait (& . epf)))
|
(wait (& . epf)))
|
||||||
|
|
||||||
;;; Sequencing operators:
|
;;; Sequencing operators:
|
||||||
|
@ -32,9 +32,9 @@
|
||||||
|
|
||||||
;;; WARNING: || is not a readable symbol in R4RS.
|
;;; WARNING: || is not a readable symbol in R4RS.
|
||||||
|
|
||||||
(define-simple-syntax (|| pf ...) (or (zero? (runn pf)) ...))
|
(define-simple-syntax (|| pf ...) (or (zero? (run pf)) ...))
|
||||||
(define-simple-syntax (:or: pf ...) (or (zero? (runn pf)) ...))
|
(define-simple-syntax (:or: pf ...) (or (zero? (run pf)) ...))
|
||||||
(define-simple-syntax (&& pf ...) (and (zero? (runn pf)) ...))
|
(define-simple-syntax (&& pf ...) (and (zero? (run pf)) ...))
|
||||||
|
|
||||||
(define-simple-syntax (run/collecting fds . epf)
|
(define-simple-syntax (run/collecting fds . epf)
|
||||||
(run/collecting* `fds (lambda () (exec-epf . epf))))
|
(run/collecting* `fds (lambda () (exec-epf . epf))))
|
||||||
|
|
Loading…
Reference in New Issue