Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
forgot to add this file thus breaking the smpi_replay test
[simgrid.git] / examples / msg / chainsend / messages.h
1 #ifndef KADEPLOY_MESSAGES_H
2 #define KADEPLOY_MESSAGES_H
3
4 #include "msg/msg.h"
5 #include "xbt/sysdep.h"
6
7 #define MESSAGE_SIZE 1
8
9 /* Messages enum */
10 typedef enum {
11   MESSAGE_BUILD_CHAIN = 0,
12   MESSAGE_SEND_DATA,
13   MESSAGE_END_DATA
14 } e_message_type;
15
16 /* Message struct */
17 typedef struct s_message {
18   e_message_type type;
19   const char *issuer_hostname;
20   const char *mailbox;
21   const char *prev_hostname;
22   const char *next_hostname;
23   const char *data_block;
24   unsigned int data_length;
25 } s_message_t, *message_t;
26
27 /* Message methods */
28 msg_task_t task_message_new(e_message_type type, const char *issuer_hostname, const char *mailbox);
29 msg_task_t task_message_chain_new(const char *issuer_hostname, const char *mailbox, const char* prev, const char *next);
30 msg_task_t task_message_data_new(const char *issuer_hostname, const char *mailbox, const char *block, unsigned int len);
31 msg_task_t task_message_end_data_new(const char *issuer_hostname, const char *mailbox);
32 void task_message_delete(void *);
33
34 #endif /* KADEPLOY_MESSAGES_H */