Barrelfish
|
functionality to spawn domains More...
Functions | |
errval_t | spawn_get_cmdline_args (struct mem_region *module, char **retargs) |
Retrive the commandline args of #name. More... | |
int | spawn_tokenize_cmdargs (char *s, char *argv[], size_t argv_len) |
Returns tokenized cmdline args. More... | |
errval_t | spawn_load_image (struct spawninfo *si, lvaddr_t binary, size_t binary_size, enum cpu_type type, const char *name, coreid_t coreid, char *const argv[], char *const envp[], struct capref inheritcn_cap, struct capref argcn_cap) |
Load an image. More... | |
errval_t | spawn_load_with_args (struct spawninfo *si, struct mem_region *module, const char *name, coreid_t coreid, char *const argv[], char *const envp[]) |
Spawn a domain with the given args. | |
errval_t | spawn_load_with_bootinfo (struct spawninfo *si, struct bootinfo *bi, const char *name, coreid_t coreid) |
Spawn a domain and give it the bootinfo struct. Just monitor and memserv should be spawned using this. | |
errval_t | spawn_span_domain (struct spawninfo *si, struct capref vroot, struct capref disp_frame) |
Span a domain with the given vroot and disp_frame. More... | |
Variables | |
char ** | environ |
functionality to spawn domains
errval_t spawn_get_cmdline_args | ( | struct mem_region * | module, |
char ** | retargs | ||
) |
Retrive the commandline args of #name.
The arguments are malloced into a new space so need to be freed after use
errval_t spawn_load_image | ( | struct spawninfo * | si, |
lvaddr_t | binary, | ||
size_t | binary_size, | ||
enum cpu_type | type, | ||
const char * | name, | ||
coreid_t | coreid, | ||
char *const | argv[], | ||
char *const | envp[], | ||
struct capref | inheritcn_cap, | ||
struct capref | argcn_cap | ||
) |
Load an image.
si | Struct used by the library |
binary | The image to load |
type | The type of arch to load for |
name | Name of the image required only to place it in disp struct |
coreid | Coreid to load for, required only to place it in disp struct |
argv | Command-line arguments, NULL-terminated |
envp | Environment, NULL-terminated |
inheritcn_cap | Cap to a CNode containing capabilities to be inherited |
argcn_cap | Cap to a CNode containing capabilities passed as arguments |
Span a domain with the given vroot and disp_frame.
Operation similar to spawning a domain but the vroot and disp_frame are already provided
int spawn_tokenize_cmdargs | ( | char * | s, |
char * | argv[], | ||
size_t | argv_len | ||
) |
Returns tokenized cmdline args.
s | Argument string, which is modified in place |
argv | Array to be filled-in with arguments |
argv_len | Length of array available in argv, including terminator |
The arguments are placed in #argv, which is NULL-terminated
char** environ |
Environment as a pointer to a pointer rather than a pointer to an array.