X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2bd9a37bbb72eac4ed613b3d6953aba6555e2e92..7f80c96356063a741966f244c8d00eaaf6f17fc0:/src/mc/mc_protocol.h diff --git a/src/mc/mc_protocol.h b/src/mc/mc_protocol.h index f0100fd06b..c71c5540f6 100644 --- a/src/mc/mc_protocol.h +++ b/src/mc/mc_protocol.h @@ -27,7 +27,6 @@ SG_BEGIN_DECL() typedef enum { MC_MODE_NONE = 0, - MC_MODE_STANDALONE, MC_MODE_CLIENT, MC_MODE_SERVER } e_mc_mode_t; @@ -47,6 +46,9 @@ typedef enum { MC_MESSAGE_REGISTER_SYMBOL, MC_MESSAGE_DEADLOCK_CHECK, MC_MESSAGE_DEADLOCK_CHECK_REPLY, + MC_MESSAGE_WAITING, + MC_MESSAGE_SIMCALL_HANDLE, + MC_MESSAGE_ASSERTION_FAILED, } e_mc_message_type; #define MC_MESSAGE_LENGTH 512 @@ -88,6 +90,12 @@ typedef struct s_mc_stack_region_message { s_stack_region_t stack_region; } s_mc_stack_region_message_t, *mc_stack_region_message_t; +typedef struct s_mc_simcall_handle_message { + e_mc_message_type type; + unsigned long pid; + int value; +} s_mc_simcall_handle_message_t, *mc_simcall_handle_message; + typedef struct s_mc_register_symbol_message { e_mc_message_type type; char name[128]; @@ -95,10 +103,13 @@ typedef struct s_mc_register_symbol_message { void* data; } s_mc_register_symbol_message_t, * mc_register_symbol_message_t; -int MC_protocol_send(int socket, void* message, size_t size); -int MC_protocol_send_simple_message(int socket, int type); -int MC_protocol_hello(int socket); -ssize_t MC_receive_message(int socket, void* message, size_t size); +XBT_INTERNAL int MC_protocol_send(int socket, const void* message, size_t size); +XBT_INTERNAL int MC_protocol_send_simple_message(int socket, e_mc_message_type type); +XBT_INTERNAL int MC_protocol_hello(int socket); +XBT_INTERNAL ssize_t MC_receive_message(int socket, void* message, size_t size, int options); + +XBT_INTERNAL const char* MC_message_type_name(e_mc_message_type type); +XBT_INTERNAL const char* MC_mode_name(e_mc_mode_t mode); SG_END_DECL()