Barrelfish
|
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... | |
char * | list_to_string (coreid_t list[], size_t l_len) |
Convert an array of coreids into a string representation of the list. More... | |
Argument processing for distributed services.
char* list_to_string | ( | coreid_t | list[], |
size_t | l_len | ||
) |
Convert an array of coreids into a string representation of the list.
The string looks like: "1,2,3,". This function mallocs the memory for the string. The calelr is therefore responsible for freeing it.
list | the list to convert. |
l_len | the number of elements in the list. |
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.
argc | a pointer to argc as passed to main(). argc will be modified. |
argv | argv as passed to main(). argv will be modified. |