RngStream stream;
snprintf(descr, sizeof descr, "RngSream<%s>", MSG_host_get_name(host));
stream = RngStream_CreateStream(descr);
- MSG_host_set_property_value(host, "stream", (char*)stream, NULL);
+ MSG_host_set_data(host, stream);
}
}
msg_host_t host;
unsigned i;
xbt_dynar_foreach(host_list, i, host) {
- RngStream stream = (RngStream)MSG_host_get_property_value(host, "stream");
+ RngStream stream = (RngStream)MSG_host_get_data(host);
RngStream_DeleteStream(&stream);
+ MSG_host_set_data(host, NULL);
}
xbt_dynar_free(&host_list);
// }
// That explained the bug in a snap, with a very cool example and everything.
//
- // This MC_assert is now desactivated as the case is now properly handled in our code and we don't want the
+ // This MC_assert is now deactivated as the case is now properly handled in our code and we don't want the
// MC to fail any further under that condition, but this comment is here to as a memorial for this first
- // brillant victory of the model-checking in the SimGrid community :)
+ // brilliant victory of the model-checking in the SimGrid community :)
if (task_received != task_sent ||
ans_data->type != TASK_FIND_SUCCESSOR_ANSWER) {
set_finger(node, 0, candidate_id);
}
if (successor_id != node->id) {
- remote_notify(node, successor_id, node->id);
+ remote_notify(successor_id, node->id);
}
}
}
/* Notifies a remote node that its predecessor may have changed. */
-void remote_notify(node_t node, int notify_id, int predecessor_candidate_id) {
+void remote_notify(int notify_id, int predecessor_candidate_id) {
task_data_t req_data = xbt_new0(s_task_data_t, 1);
req_data->type = TASK_NOTIFY;
// initialize my node
s_node_t node = {0};
node.id = xbt_str_parse_int(argv[1],"Invalid ID: %s");
- node.stream = (RngStream)MSG_host_get_property_value(MSG_host_self(), "stream");
+ node.stream = (RngStream)MSG_host_get_data(MSG_host_self());
get_mailbox(node.id, node.mailbox);
node.next_finger_to_fix = 0;
node.fingers = xbt_new0(s_finger_t, nb_bits);
if (join_success) {
double now = MSG_get_clock();
+ int listen = 0;
+ int no_op = 0;
while (now < init_time + deadline && now < max_simulation_time) {
-
if (node.comm_receive == NULL) {
task_received = NULL;
node.comm_receive = MSG_task_irecv(&task_received, node.mailbox);
if (!MSG_comm_test(node.comm_receive)) { // no task was received: make some periodic calls
if(MC_is_active() || MC_record_replay_is_active()){
- int listen = 0;
- int no_op = 0;
int sub_protocol = MC_random(0, 4);
if(MC_is_active() && !MC_visited_reduction() && no_op)
MC_cut();