]> AND Public Git Repository - simgrid.git/blobdiff - src/simix/smx_user.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't hide type real type, smx_process_t, behind a void*.
[simgrid.git] / src / simix / smx_user.c
index 54acb6f247582e2fd737b60d3752fdf38ceb971e..5e1d9d8680363ca8815cd5bccfc424841d0dd047 100644 (file)
@@ -1,7 +1,7 @@
 /* smx_user.c - public interface to simix                                   */
 
 /* Copyright (c) 2010-2014. The SimGrid Team.
  All rights reserved.                                                     */
* All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -1019,9 +1019,11 @@ void simcall_comm_recv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
 
   if (MC_is_active()) {
     /* the model-checker wants two separate simcalls */
-    smx_action_t comm = simcall_comm_irecv(rdv, dst_buff, dst_buff_size,
-                                           match_fun, data, rate);
+    smx_action_t comm = NULL; /* MC needs the comm to be set to NULL during the simcall */
+    comm = simcall_comm_irecv(rdv, dst_buff, dst_buff_size,
+                              match_fun, data, rate);
     simcall_comm_wait(comm, timeout);
+    comm = NULL;
   }
   else {
     simcall_BODY_comm_recv(rdv, dst_buff, dst_buff_size,