-/* Copyright (c) 2013-2018. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2013-2019. The SimGrid Team. 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. */
static int routing_next(node_t node, int dest);
/**
- * \brief Gets the mailbox name of a host given its chord id.
- * \param node_id id of a node
- * \param mailbox pointer to where the mailbox name should be written
+ * @brief Gets the mailbox name of a host given its chord id.
+ * @param node_id id of a node
+ * @param mailbox pointer to where the mailbox name should be written
* (there must be enough space)
*/
static void get_mailbox(int node_id, char* mailbox)
// if the node is ready, do all the pending tasks and send update to known nodes
if (node->ready==0) {
XBT_DEBUG("Node %i is ready!!!", node->id);
- while(xbt_dynar_length(node->pending_tasks)){
+ while (!xbt_dynar_is_empty(node->pending_tasks)) {
msg_task_t task;
xbt_dynar_shift(node->pending_tasks, &task);
handle_task(node, task);
}
/**
- * \brief Node Function
+ * @brief Node Function
* Arguments:
* - my id
* - the id of a guy I know in the system (except for the first node)
return 1;
}
-/** \brief Main function. */
+/** @brief Main function. */
int main(int argc, char *argv[])
{
MSG_init(&argc, argv);