Barrelfish
Functions
args.c File Reference

Argument processing for distributed services. More...

Functions

struct dist_args process_dist_args (int *argc, char **argv[])
 Process and return the generic distributed service command-line arguments. More...
 

Detailed Description

Argument processing for distributed services.

Function Documentation

struct dist_args process_dist_args ( int *  argc,
char **  argv[] 
)

Process and return the generic distributed service command-line arguments.

The generic distributed service command-line arguments are processed, and appropriate values set in the return struct. In particular, this procedire creates and returns a list of cores to start the service on based on the arguments and possibly querying the SKB.

After processing argc and argv are modified so that argv points to all un-recognised arguments. In this way, service-specific arguments can still be processed separately.

Parameters
argca pointer to argc as passed to main(). argc will be modified.
argvargv as passed to main(). argv will be modified.
Returns
A struct containing the values of the processed arguments. The list elements of the struct are malloced (and so must be freed by the caller), but the path element is not.