Barrelfish
Functions
start.c File Reference

Startup code for distributed services. More...

Functions

int dist_main (struct dist_args *d_args, void *m_args, char *name)
 Main function that starts work for master and worker dispatchers. More...
 

Detailed Description

Startup code for distributed services.

Function Documentation

int dist_main ( struct dist_args *  d_args,
void *  m_args,
char *  name 
)

Main function that starts work for master and worker dispatchers.

Depending on the arguments passed in d_args->master this function starts a dispatcher running as a master or a worker. As a master it spwans worker dispatchers on the given cores (d_args->cores) and then calls the externally defined run_master() function. As a worker it calls the externally defined run_worker() function.

Parameters
d_argsthe generic distributed service arguments passed to this dispatcher.
m_argsthe service-specific arguments passed to this dispatcher.
namethe name of this service.
Returns
an exit value (main() should return this value).