X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/de6fe5331b6bca5f67584856912729a0814118ef..3e6198594720a26230708e18265ad47f8788d421:/src/gras/Virtu/sg_process.c diff --git a/src/gras/Virtu/sg_process.c b/src/gras/Virtu/sg_process.c index a69254a74e..63ba131654 100644 --- a/src/gras/Virtu/sg_process.c +++ b/src/gras/Virtu/sg_process.c @@ -17,6 +17,7 @@ gras_process_init() { gras_error_t errcode; gras_hostdata_t *hd=(gras_hostdata_t *)MSG_host_get_data(MSG_host_self()); gras_procdata_t *pd; + gras_sg_portrec_t prraw,pr; int i; if (!(pd=(gras_procdata_t *)malloc(sizeof(gras_procdata_t)))) @@ -50,6 +51,12 @@ gras_process_init() { pd->chan = i; hd->proc[ i ] = MSG_process_self_PID(); + /* regiter it to the ports structure */ + pr.port = -1; + pr.tochan = i; + pr.raw = 0; + TRY(gras_dynar_push(hd->ports,&pr)); + /* take a free RAW channel for this process */ for (i=0; iproc[i]; i++); if (i == GRAS_MAX_CHANNEL) { @@ -61,9 +68,11 @@ gras_process_init() { hd->proc[ i ] = MSG_process_self_PID(); - /* Connect a dummy socket to ourselves. It's returned by select() */ - TRY(gras_socket_client(MSG_host_get_name(MSG_host_self()), - pd->chan, &(pd->sock))); + /* regiter it to the ports structure */ + prraw.port = -1; + prraw.tochan = i; + prraw.raw = 1; + TRY(gras_dynar_push(hd->ports,&prraw)); VERB2("Creating process '%s' (%d)", MSG_process_get_name(MSG_process_self()),