+int SIMIX_request_is_enabled_by_idx(smx_req_t req, unsigned int idx)
+{
+ smx_action_t act;
+
+ switch (req->call) {
+
+ case REQ_COMM_WAIT:
+ /* FIXME: check also that src and dst processes are not suspended */
+ act = req->comm_wait.comm;
+ return (act->comm.src_proc && act->comm.dst_proc);
+ break;
+
+ case REQ_COMM_WAITANY:
+ act = xbt_dynar_get_as(req->comm_waitany.comms, idx, smx_action_t);
+ return (act->comm.src_proc && act->comm.dst_proc);
+ break;
+
+ default:
+ return TRUE;
+ }
+}