-unsigned int MC_request_testany_fail(smx_simcall_t req)
-{
- // Remote xbt_dynar_foreach on simcall_comm_testany__get__comms(req).
-
- // Read the dynar:
- s_xbt_dynar_t comms;
- mc_model_checker->process().read_bytes(
- &comms, sizeof(comms), remote(simcall_comm_testany__get__comms(req)));
-
- // Read ther dynar buffer:
- size_t buffer_size = comms.elmsize * comms.used;
- char buffer[buffer_size];
- mc_model_checker->process().read_bytes(
- buffer, buffer_size, remote(comms.data));
-
- // Iterate over the elements:
- assert(comms.elmsize == sizeof(smx_synchro_t));
- unsigned cursor;
- for (cursor=0; cursor != comms.used; ++cursor) {
-
- // Get the element:
- smx_synchro_t remote_action = NULL;
- memcpy(&remote_action, buffer + comms.elmsize * cursor, sizeof(remote_action));
-
- // Dereference the pointer:
- s_smx_synchro_t action;
- mc_model_checker->process().read_bytes(
- &action, sizeof(action), remote(remote_action));