Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge pull request #2 from mquinson/master
[simgrid.git] / examples / msg / kademlia / task.h
index 4924549..a7cd143 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2014. The SimGrid Team.
+/* Copyright (c) 2012, 2014-2016. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -8,10 +8,9 @@
 #define _MSG_KADEMLIA_EXAMPLES_TASK
 #include "common.h"
 #include "node.h"
-#include "msg/msg.h"
-/**
-  * Types of tasks exchanged
-  */
+#include "simgrid/msg.h"
+
+/* Types of tasks exchanged */
 typedef enum {
   TASK_FIND_NODE,
   TASK_FIND_NODE_ANSWER,
@@ -21,9 +20,8 @@ typedef enum {
   TASK_PING_ANSWER,
   TASK_LEAVING
 } e_task_type_t;
-/**
-  * Data attached with the tasks
-  */
+
+/* Data attached with the tasks */
 typedef struct s_task_data {
   e_task_type_t type;
   unsigned int sender_id;       //Id of the guy who sent the task
@@ -34,19 +32,11 @@ typedef struct s_task_data {
 } s_task_data_t, *task_data_t;
 
 //Task handling functions
-msg_task_t task_new_find_node(unsigned int sender_id,
-                              unsigned int destination_id, char *mailbox,
-                              const char *hostname);
-
-msg_task_t task_new_find_node_answer(unsigned int sender_id,
-                                     unsigned int destination_id,
-                                     answer_t answer, char *mailbox,
-                                     const char *hostname);
-
-msg_task_t task_new_ping(unsigned int sender_id, char *mailbox,
-                         const char *hostname);
-msg_task_t task_new_ping_answer(unsigned int sender_id, char *mailbox,
-                                const char *hostname);
+msg_task_t task_new_find_node(unsigned int sender_id, unsigned int destination_id, char *mailbox, const char *hostname);
+msg_task_t task_new_find_node_answer(unsigned int sender_id, unsigned int destination_id, answer_t answer,
+                                     char *mailbox, const char *hostname);
+msg_task_t task_new_ping(unsigned int sender_id, char *mailbox, const char *hostname);
+msg_task_t task_new_ping_answer(unsigned int sender_id, char *mailbox, const char *hostname);
 void task_free(msg_task_t task);
 void task_free_v(void *task);
 #endif                          /* _MSG_KADEMLIA_EXAMPLES_TASK */