X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/94a5e6c017fdcf4882fe6cb518b6005d4c8dd8ae..23f5bf52cc58cf837840f231cf638e9fcd45097b:/src/simix/smx_smurf_private.h diff --git a/src/simix/smx_smurf_private.h b/src/simix/smx_smurf_private.h index 07385e95dd..ad7ef0679c 100644 --- a/src/simix/smx_smurf_private.h +++ b/src/simix/smx_smurf_private.h @@ -45,11 +45,16 @@ SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_GET_NAME),\ SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_IS_SUSPENDED),\ SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_GET_PROPERTIES),\ SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_SLEEP),\ +SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_ON_EXIT),\ +SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_AUTO_RESTART_SET),\ +SIMCALL_ENUM_ELEMENT(SIMCALL_PROCESS_RESTART),\ SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_CREATE),\ SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_DESTROY),\ SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_GEY_BY_NAME),\ SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_COMM_COUNT_BY_HOST),\ SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_GET_HEAD),\ +SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_SET_RECV),\ +SIMCALL_ENUM_ELEMENT(SIMCALL_RDV_GET_RECV),\ SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_SEND),\ SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_ISEND),\ SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_RECV),\ @@ -60,6 +65,7 @@ SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_WAITANY),\ SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_WAIT),\ SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_TEST),\ SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_TESTANY),\ +SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_IPROBE),\ SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_GET_REMAINS),\ SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_GET_STATE),\ SIMCALL_ENUM_ELEMENT(SIMCALL_COMM_GET_SRC_DATA),\ @@ -88,7 +94,14 @@ SIMCALL_ENUM_ELEMENT(SIMCALL_FILE_READ),\ SIMCALL_ENUM_ELEMENT(SIMCALL_FILE_WRITE),\ SIMCALL_ENUM_ELEMENT(SIMCALL_FILE_OPEN),\ SIMCALL_ENUM_ELEMENT(SIMCALL_FILE_CLOSE),\ -SIMCALL_ENUM_ELEMENT(SIMCALL_FILE_STAT) +SIMCALL_ENUM_ELEMENT(SIMCALL_FILE_STAT), \ +SIMCALL_ENUM_ELEMENT(SIMCALL_FILE_UNLINK),\ +SIMCALL_ENUM_ELEMENT(SIMCALL_FILE_LS),\ +SIMCALL_ENUM_ELEMENT(SIMCALL_ASR_GET_PROPERTIES), \ +/* ****************************************************************************************** */ \ +/* TUTORIAL: New API */ \ +/* ****************************************************************************************** */ \ +SIMCALL_ENUM_ELEMENT(SIMCALL_NEW_API_INIT) /* SIMCALL_COMM_IS_LATENCY_BOUNDED and SIMCALL_SET_CATEGORY make things complicated @@ -107,8 +120,16 @@ SIMCALL_ENUM_ELEMENT(SIMCALL_FILE_STAT) #define SIMCALL_LIST3 #endif +#ifdef HAVE_MC +#define SIMCALL_LIST4 \ + ,SIMCALL_ENUM_ELEMENT(SIMCALL_MC_SNAPSHOT) \ + ,SIMCALL_ENUM_ELEMENT(SIMCALL_MC_COMPARE_SNAPSHOTS) +#else +#define SIMCALL_LIST4 +#endif + /* SIMCALL_LIST is the final macro to use */ -#define SIMCALL_LIST SIMCALL_LIST1 SIMCALL_LIST2 SIMCALL_LIST3 +#define SIMCALL_LIST SIMCALL_LIST1 SIMCALL_LIST2 SIMCALL_LIST3 SIMCALL_LIST4 /* you can redefine the following macro differently to generate something else * with the list of enumeration values (e.g. a table of strings or a table of function pointers) */ @@ -223,9 +244,11 @@ typedef struct s_smx_simcall { xbt_main_func_t code; void *data; const char *hostname; + double kill_time; int argc; char **argv; xbt_dict_t properties; + int auto_restart; } process_create; struct { @@ -288,6 +311,22 @@ typedef struct s_smx_simcall { e_smx_state_t result; } process_sleep; + struct { + smx_process_t process; + int_f_pvoid_t fun; + void *data; + } process_on_exit; + + struct { + smx_process_t process; + int auto_restart; + } process_auto_restart; + + struct { + smx_process_t process; + smx_process_t result; + } process_restart; + struct { const char *name; smx_rdv_t result; @@ -313,13 +352,23 @@ typedef struct s_smx_simcall { smx_action_t result; } rdv_get_head; + struct { + smx_rdv_t rdv; + smx_process_t receiver; + } rdv_set_rcv_proc; + + struct { + smx_rdv_t rdv; + smx_process_t result; + } rdv_get_rcv_proc; + struct { smx_rdv_t rdv; double task_size; double rate; void *src_buff; size_t src_buff_size; - int (*match_fun)(void *, void *); + int (*match_fun)(void *, void *, smx_action_t); void *data; double timeout; } comm_send; @@ -330,7 +379,7 @@ typedef struct s_smx_simcall { double rate; void *src_buff; size_t src_buff_size; - int (*match_fun)(void *, void *); + int (*match_fun)(void *, void *, smx_action_t); void (*clean_fun)(void *); void *data; int detached; @@ -341,7 +390,7 @@ typedef struct s_smx_simcall { smx_rdv_t rdv; void *dst_buff; size_t *dst_buff_size; - int (*match_fun)(void *, void *); + int (*match_fun)(void *, void *, smx_action_t); void *data; double timeout; } comm_recv; @@ -350,11 +399,20 @@ typedef struct s_smx_simcall { smx_rdv_t rdv; void *dst_buff; size_t *dst_buff_size; - int (*match_fun)(void *, void *); - void *data; + int (*match_fun)(void *, void *, smx_action_t); + void *data; smx_action_t result; } comm_irecv; + struct { + smx_rdv_t rdv; + int src; + int tag; + int (*match_fun)(void *, void *, smx_action_t); + void *data; + smx_action_t result; + } comm_iprobe; + struct { smx_action_t comm; } comm_destroy; @@ -508,16 +566,14 @@ typedef struct s_smx_simcall { } sem_get_capacity; struct { - const char* storage; void *ptr; size_t size; size_t nmemb; smx_file_t stream; - size_t result; + double result; } file_read; struct { - const char* storage; const void *ptr; size_t size; size_t nmemb; @@ -526,26 +582,58 @@ typedef struct s_smx_simcall { } file_write; struct { - const char* storage; + const char* mount; const char* path; const char* mode; smx_file_t result; } file_open; struct { - const char* storage; smx_file_t fp; int result; } file_close; struct { - const char* storage; - int fd; - //Next should be struct stat* buf - void* buf; + smx_file_t fd; + s_file_stat_t buf; int result; } file_stat; + struct { + smx_file_t fd; + int result; + } file_unlink; + + struct { + const char *mount; + const char *path; + xbt_dict_t result; + } file_ls; + + struct { + const char* name; + xbt_dict_t result; + } asr_get_properties; + + struct{ + void *s; + } mc_snapshot; + + struct{ + void *snapshot1; + void *snapshot2; + int result; + } mc_compare_snapshots; + + /* ****************************************************************************************** */ + /* TUTORIAL: New API */ + /* ****************************************************************************************** */ + struct { + const char* param1; + double param2; + int result; + } new_api; + }; } s_smx_simcall_t, *smx_simcall_t;