X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/94974c282c6e6d096238716853bb053330170d76..18c57b27dd71ee7839c6a90368c845886a87d638:/src/gras/Transport/transport_plugin_sg.c diff --git a/src/gras/Transport/transport_plugin_sg.c b/src/gras/Transport/transport_plugin_sg.c index 0ec86e3ae5..0eac7be89c 100644 --- a/src/gras/Transport/transport_plugin_sg.c +++ b/src/gras/Transport/transport_plugin_sg.c @@ -91,9 +91,9 @@ static int gras_trp_sg_peer_port(gras_socket_t s) { static const char* gras_trp_sg_peer_name(gras_socket_t s) { gras_trp_sg_sock_data_t sockdata = s->data; if (gras_socket_im_the_server(s)) - return SIMIX_host_get_name(SIMIX_req_process_get_host(sockdata->client)); + return SIMIX_host_get_name(simcall_process_get_host(sockdata->client)); else { - return SIMIX_host_get_name(SIMIX_req_process_get_host(sockdata->server)); + return SIMIX_host_get_name(simcall_process_get_host(sockdata->server)); } } static const char* gras_trp_sg_peer_proc(gras_socket_t s) { @@ -139,11 +139,11 @@ void gras_trp_sg_socket_client(gras_trp_plugin_t self, gras_sg_portrec_t pr; /* make sure this socket will reach someone */ - if (!(peer = SIMIX_req_host_get_by_name(host))) + if (!(peer = simcall_host_get_by_name(host))) THROWF(mismatch_error, 0, "Can't connect to %s: no such host.\n", host); - if (!(hd = (gras_hostdata_t *) SIMIX_req_host_get_data(peer))) + if (!(hd = (gras_hostdata_t *) simcall_host_get_data(peer))) THROWF(mismatch_error, 0, "can't connect to %s: no process on this host", host); @@ -179,15 +179,15 @@ void gras_trp_sg_socket_client(gras_trp_plugin_t self, /* initialize synchronization stuff on the socket */ data->rdv_server = pr->rdv; - data->rdv_client = SIMIX_req_rdv_create(NULL); - data->comm_recv = SIMIX_req_comm_irecv(data->rdv_client, &data->msg, NULL, NULL, NULL); + data->rdv_client = simcall_rdv_create(NULL); + data->comm_recv = simcall_comm_irecv(data->rdv_client, &data->msg, NULL, NULL, NULL); /* connect that simulation data to the socket */ sock->data = data; sock->incoming = 1; XBT_DEBUG("%s (PID %d) connects in %s mode to %s:%d (rdv_ser:%p, rdv_cli:%p, comm:%p)", - SIMIX_req_process_get_name(SIMIX_process_self()), gras_os_getpid(), + simcall_process_get_name(SIMIX_process_self()), gras_os_getpid(), sock->meas ? "meas" : "regular", host, port, data->rdv_server,data->rdv_client,data->comm_recv); } @@ -218,7 +218,7 @@ void gras_trp_sg_socket_server(gras_trp_plugin_t self, int port, gras_socket_t s pr->meas = sock->meas; pr->server = SIMIX_process_self(); xbt_dynar_push(hd->ports, &pr); - pr->rdv = SIMIX_req_rdv_create(NULL); + pr->rdv = simcall_rdv_create(NULL); /* Create the socket */ data = xbt_new0(s_gras_trp_sg_sock_data_t, 1); @@ -227,13 +227,13 @@ void gras_trp_sg_socket_server(gras_trp_plugin_t self, int port, gras_socket_t s data->client = NULL; data->rdv_server = pr->rdv; data->rdv_client = NULL; - data->comm_recv = SIMIX_req_comm_irecv(pr->rdv, &data->msg, NULL, NULL, NULL); + data->comm_recv = simcall_comm_irecv(pr->rdv, &data->msg, NULL, NULL, NULL); sock->data = data; XBT_VERB ("'%s' (%d) ears on %s:%d%s (%p; data:%p); Here rdv: %p; Remote rdv: %p; Comm %p", - SIMIX_req_process_get_name(SIMIX_process_self()), gras_os_getpid(), + simcall_process_get_name(SIMIX_process_self()), gras_os_getpid(), SIMIX_host_self_get_name(), port, sock->meas ? " (mode meas)" : "", sock, data, (data->server == @@ -315,7 +315,7 @@ void gras_trp_sg_chunk_send_raw(gras_socket_t sock, smx_process_t remote_dude = (sock_data->server == SIMIX_process_self())? (sock_data->client) : (sock_data->server); - smx_host_t remote_host = SIMIX_req_process_get_host(remote_dude); + smx_host_t remote_host = simcall_process_get_host(remote_dude); } */ //SIMIX_network_send(sock_data->rdv,size,1,-1,NULL,0,NULL,NULL); @@ -329,7 +329,7 @@ int gras_trp_sg_chunk_recv(gras_socket_t sock, //gras_trp_sg_sock_data_t *sock_data = // (gras_trp_sg_sock_data_t *) sock->data; - //SIMIX_req_comm_recv(sock_data->rdv,-1,NULL,0,NULL); + //simcall_comm_recv(sock_data->rdv,-1,NULL,0,NULL); THROW_UNIMPLEMENTED; #ifdef KILLME gras_trp_sg_sock_data_t *remote_sock_data; @@ -355,17 +355,17 @@ int gras_trp_sg_chunk_recv(gras_socket_t sock, sock_data = (gras_trp_sg_sock_data_t *) sock->data; /* ok, I'm here, you can continue the communication */ - SIMIX_req_cond_signal(remote_sock_data->cond); + simcall_cond_signal(remote_sock_data->cond); - SIMIX_req_mutex_lock(remote_sock_data->mutex); + simcall_mutex_lock(remote_sock_data->mutex); /* wait for communication end */ - SIMIX_req_cond_wait(remote_sock_data->cond, remote_sock_data->mutex); + simcall_cond_wait(remote_sock_data->cond, remote_sock_data->mutex); if (msg_got->payl_size != size) THROWF(mismatch_error, 0, "Got %d bytes when %ld where expected (in %s->%s:%d)", msg_got->payl_size, size, - SIMIX_req_host_get_name(sock_data->to_host), + simcall_host_get_name(sock_data->to_host), SIMIX_host_self_get_name(), sock->peer_port); if (data) @@ -374,7 +374,7 @@ int gras_trp_sg_chunk_recv(gras_socket_t sock, xbt_free(msg_got->payl); xbt_free(msg_got); - SIMIX_req_mutex_unlock(remote_sock_data->mutex); + simcall_mutex_unlock(remote_sock_data->mutex); #endif return 0; }