- xbt_assert(p_state == started || p_state == inited);
-
- if (p_state == started)
- simcall_comm_wait(p_inferior, -1/*timeout*/);
- else {// p_state == inited. Save a simcall and do directly a blocking send/recv
- if (p_srcBuff != NULL) {
- simcall_comm_send(p_sender->getInferior(), p_mailbox->getInferior(), p_remains, p_rate,
- p_srcBuff, p_srcBuffSize,
- p_matchFunction, p_copyDataFunction,
- p_userData, -1 /*timeout*/);
- } else {
- simcall_comm_recv(p_receiver->getInferior(), p_mailbox->getInferior(), p_dstBuff, &p_dstBuffSize,
- p_matchFunction, p_copyDataFunction,
- p_userData, -1/*timeout*/, p_rate);
- }
- }
- p_state = finished;
+ xbt_assert(p_state == started || p_state == inited);
+
+ if (p_state == started)
+ simcall_comm_wait(p_inferior, -1/*timeout*/);
+ else {// p_state == inited. Save a simcall and do directly a blocking send/recv
+ if (p_srcBuff != NULL) {
+ simcall_comm_send(p_sender->getInferior(), p_mailbox->getInferior(), p_remains, p_rate,
+ p_srcBuff, p_srcBuffSize,
+ p_matchFunction, p_copyDataFunction,
+ p_userData, -1 /*timeout*/);
+ } else {
+ simcall_comm_recv(p_receiver->getInferior(), p_mailbox->getInferior(), p_dstBuff, &p_dstBuffSize,
+ p_matchFunction, p_copyDataFunction,
+ p_userData, -1/*timeout*/, p_rate);
+ }
+ }
+ p_state = finished;