add_subdirectory(${PROJECT_DIRECTORY}/examples/msg/masterslave)
add_subdirectory(${PROJECT_DIRECTORY}/examples/msg/trace)
add_subdirectory(${PROJECT_DIRECTORY}/examples/msg/tracing)
-add_subdirectory(${PROJECT_DIRECTORY}/examples/msg/mc)
+
+if(HAVE_MC)
+ add_subdirectory(${PROJECT_DIRECTORY}/examples/msg/mc)
+endif(HAVE_MC)
+
if(HAVE_GTNETS)
add_definitions("-lgtnets -L${gtnets_path}/lib -I${gtnets_path}/include/gtnets")
add_subdirectory(${PROJECT_DIRECTORY}/examples/msg/gtnets)
smx_comm_t comm;
/*If running in model-checking mode then intercept the communication action*/
- if (_surf_do_model_check)
- MC_trans_intercept_isend(rdv);
-
+ #ifdef HAVE_MC
+ if (_surf_do_model_check)
+ MC_trans_intercept_isend(rdv);
+ #endif
/* Look for communication request matching our needs.
If it is not found then create it and push it into the rendez-vous point */
comm = SIMIX_rdv_get_request(rdv, comm_recv);
smx_comm_t comm;
/*If running in model-checking mode then intercept the communication action*/
+#ifdef HAVE_MC
if (_surf_do_model_check)
MC_trans_intercept_irecv(rdv);
-
+#endif
/* Look for communication request matching our needs.
* If it is not found then create it and push it into the rendez-vous point
*/
XBT_INLINE void SIMIX_network_wait(smx_comm_t comm, double timeout)
{
/*If running in model-checking mode then intercept the communication action*/
+#ifdef HAVE_MC
if (_surf_do_model_check)
MC_trans_intercept_wait(comm);
-
+#endif
/* Wait for communication completion */
SIMIX_communication_wait_for_completion(comm, timeout);
}
XBT_INLINE int SIMIX_network_test(smx_comm_t comm)
{
/*If running in model-checking mode then intercept the communication action*/
+#ifdef HAVE_MC
if (_surf_do_model_check)
MC_trans_intercept_test(comm);
+#endif
/* Copy data if the communication is done */
if(comm->sem && !SIMIX_sem_would_block(comm->sem)){
smx_comm_t comm,comm_finished=NULL;
/*If running in model-checking mode then intercept the communication action*/
+#ifdef HAVE_MC
if (_surf_do_model_check)
MC_trans_intercept_waitany(comms);
-
+#endif
xbt_dynar_foreach(comms,cursor,comm)
xbt_dynar_push(sems,&(comm->sem));
/* Check for errors and cleanup the comm */
SIMIX_communication_wait_for_completion(comm_finished,-1);
return found_comm;
-}
\ No newline at end of file
+}