204 lines
4.1 KiB
Scheme
204 lines
4.1 KiB
Scheme
(define-interface jobd-interface
|
|
(export make-jobd
|
|
jobd?
|
|
version
|
|
execute
|
|
stop
|
|
continue
|
|
shutdown
|
|
set-jobbers!))
|
|
|
|
(define-structure jobd jobd-interface
|
|
(open scheme-with-scsh
|
|
formats
|
|
srfi-1
|
|
(with-prefix srfi-8 srfi-8/)
|
|
srfi-9
|
|
srfi-11
|
|
threads
|
|
threads-internal
|
|
(with-prefix rendezvous cml-rv/)
|
|
(with-prefix mcast-channels cml-mcast-ch/)
|
|
(with-prefix rendezvous-channels cml-sync-ch/)
|
|
(with-prefix rendezvous-async-channels cml-async-ch/)
|
|
finite-types
|
|
job
|
|
cml-pe)
|
|
(files jobd))
|
|
|
|
(define-interface cml-pe-interface
|
|
(export cml-fork
|
|
cml-fork-collecting))
|
|
|
|
(define-structure cml-pe cml-pe-interface
|
|
(open scheme-with-scsh
|
|
srfi-9
|
|
threads
|
|
(with-prefix rendezvous cml-rv/)
|
|
(with-prefix rendezvous-channels cml-sync-ch/))
|
|
(files cml-pe))
|
|
|
|
(define-interface mcast-channels-interface
|
|
(export make-mcast-channel
|
|
mcast-channel?
|
|
mcast-port?
|
|
mcast
|
|
mcast-port
|
|
mcast-port-receive
|
|
mcast-port-receive-rv))
|
|
|
|
(define-structure mcast-channels mcast-channels-interface
|
|
(open scheme
|
|
srfi-9
|
|
threads
|
|
finite-types
|
|
rendezvous
|
|
rendezvous-channels)
|
|
(files mcast-channels))
|
|
|
|
(define-interface job-interface
|
|
(export make-job-desc
|
|
job-desc?
|
|
job-desc-wd
|
|
job-desc-env
|
|
job-desc-cmd
|
|
make-job-res
|
|
job-res?
|
|
job-res-errno
|
|
job-res-stdout
|
|
job-res-stderr
|
|
display-job-output))
|
|
|
|
(define-structure job job-interface
|
|
(open scheme-with-scsh
|
|
srfi-9)
|
|
(files job))
|
|
|
|
(define-structure test-jobd
|
|
(export do-some-jobs)
|
|
(open scheme-with-scsh
|
|
locks
|
|
threads
|
|
threads-internal
|
|
srfi-1
|
|
(with-prefix rendezvous cml-rv/)
|
|
(with-prefix rendezvous-channels cml-sync-ch/)
|
|
(with-prefix rendezvous-async-channels cml-async-ch/)
|
|
cml-pe
|
|
job
|
|
(with-prefix jobd jobd/))
|
|
(files test-jobd))
|
|
|
|
(define-structure test-mcast-channels
|
|
(export test-it)
|
|
(open scheme
|
|
srfi-9
|
|
threads
|
|
rendezvous
|
|
rendezvous-channels
|
|
mcast-channels)
|
|
(files test-mcast-channels))
|
|
|
|
(define-interface collect-channels-interface
|
|
(export make-tagged-msg
|
|
is-tagged-msg?
|
|
tagged-msg-tag
|
|
tagged-msg-stripped
|
|
collect&reply/make-channel
|
|
send&collect/make-channel
|
|
is-collect&reply-channel?
|
|
is-send&collect-channel?
|
|
make-link
|
|
collect&reply/receive
|
|
collect&reply/receive-rv
|
|
collect&reply/send
|
|
collect&reply/send-rv
|
|
send&collect/send
|
|
send&collect/send-rv
|
|
send&collect/receive
|
|
send&collect/receive-rv))
|
|
|
|
(define-structure collect-channels collect-channels-interface
|
|
(open scheme-with-scsh
|
|
finite-types
|
|
srfi-9
|
|
threads
|
|
threads-internal
|
|
(with-prefix rendezvous cml-rv/)
|
|
(with-prefix rendezvous-channels cml-sync-ch/))
|
|
(files collect-channels))
|
|
|
|
(define-interface make-rule-interface
|
|
(export make-rule
|
|
is-rule?
|
|
make-empty-rule-set
|
|
rule-set-add
|
|
is-rule-set?
|
|
make-rule-result
|
|
is-rule-result?
|
|
rule-make))
|
|
|
|
(define-structure make-rule make-rule-interface
|
|
(open scheme-with-scsh
|
|
locks
|
|
with-lock
|
|
threads
|
|
srfi-1
|
|
srfi-9
|
|
finite-types
|
|
collect-channels
|
|
(with-prefix rendezvous cml-rv/)
|
|
(with-prefix rendezvous-channels cml-sync-ch/))
|
|
(files make-rule))
|
|
|
|
(define-interface make-rule-no-cml-interface
|
|
(export make-rule
|
|
is-rule?
|
|
make-empty-rule-set
|
|
rule-set-add
|
|
is-rule-set?
|
|
make-rule-result
|
|
is-rule-result?
|
|
rule-make))
|
|
|
|
(define-structure make-rule-no-cml make-rule-no-cml-interface
|
|
(open scheme-with-scsh
|
|
locks
|
|
with-lock
|
|
srfi-1
|
|
srfi-9)
|
|
(files make-rule-no-cml))
|
|
|
|
(define-interface rule-trans-set-interface
|
|
(export make-rule-trans-set
|
|
is-rule-trans-set?
|
|
make-empty-rule-trans-set
|
|
make-rule-trans-set
|
|
rule-trans-set-rule-candidates
|
|
rule-trans-set-known-rules
|
|
rule-trans-set-rule-set
|
|
rule-trans-set-add
|
|
rule-candidate-get
|
|
known-rules-get))
|
|
|
|
(define-structure rule-trans-set rule-trans-set-interface
|
|
(open scheme-with-scsh
|
|
srfi-1
|
|
srfi-9
|
|
make-rule)
|
|
(files rule-trans-set))
|
|
|
|
(define-interface macros-interface
|
|
(export (make :syntax)
|
|
(makefile :syntax)
|
|
(makefile-rule :syntax)
|
|
(make-is-out-of-date? :syntax)))
|
|
|
|
(define-structure macros macros-interface
|
|
(open scheme-with-scsh
|
|
srfi-1
|
|
make-rule
|
|
rule-trans-set)
|
|
(files macros))
|
|
|