


## compile-client.api -- Handling compile servers.
## (C) 1999 Lucent Technologies, Bell Laboratories
## Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp)
# Compiled by:
# src/app/make7/simple-concurrency/Simple_Concurrency.make6# API for a simple facility allowing us to
# spread a 'make' across multiple processors
# on one machine, or across multiple machines
# sharing a common filesystem, using Unix
# processes connected by pipes and ssh connections
# and such.
#
# This is still rather crude and not very robust.
# A "real" implementation exists only for Unix.
api Compile_Client {
Server_Handle;
# Add a compile server:
start: { name: String,
cmd: (String, List( String )),
path_translator: Null_Or (String -> String),
preference: Int
}
->
Null_Or( Server_Handle );
stop: Server_Handle -> Void;
kill: Server_Handle -> Void;
name: Server_Handle -> String;
# Reset scheduler and wait until all servers are idle.
# The "bool" argument makes reset suitable as an argument
# to safely::do.
reset: Bool -> Void;
# Check whether all servers are currently idle:
all_idle: Void -> Bool;
cd: String -> Void;
# Signal all servers that we are starting with a new .make6 file:
make: { platform: String, # "x86-linux" or such.
project: String
}
->
Void;
# Signal all servers that we are doing another make_compiler::make:
make_compiler
:
{ build_directory: String, # Usually "build7", "build7-1" or "build7-2".
platform: String, # "x86-linux" or such.
root: String
}
->
Void;
# Make the slave's make_compiler engine perform a reset:
make_compiler_reset
:
{ platform: String } # "x86-linux" or such.
->
Void;
# Schedule a compilation:
compile: String -> Bool;
# Run some thunk with compile parallelism enabled:
with_servers: (Void -> X) -> X;
# Check whether there are any servers attached:
no_servers: Void -> Bool;
};


