X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5de8fe9ad7bfa1bee9e28dd030f6c57ea529ad20..fe503dfa41c532a17a4fc3f6b244e72e7783d386:/src/simix/popping_accessors.h diff --git a/src/simix/popping_accessors.h b/src/simix/popping_accessors.h index a7f4b162b9..cd425d9746 100644 --- a/src/simix/popping_accessors.h +++ b/src/simix/popping_accessors.h @@ -15,19 +15,6 @@ */ #include "src/simix/popping_private.h" -static inline smx_actor_t simcall_process_kill__get__process(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->args[0]); -} -static inline smx_actor_t simcall_process_kill__getraw__process(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args[0]); -} -static inline void simcall_process_kill__set__process(smx_simcall_t simcall, smx_actor_t arg) -{ - simgrid::simix::marshal(simcall->args[0], arg); -} - static inline int simcall_process_killall__get__reset_pid(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); @@ -99,8 +86,9 @@ static inline int simcall_process_join__getraw__result(smx_simcall_t simcall) { return simgrid::simix::unmarshal_raw(simcall->result); } -static inline void simcall_process_join__set__result(smx_simcall_t simcall, int result){ - simgrid::simix::marshal(simcall->result, result); +static inline void simcall_process_join__set__result(smx_simcall_t simcall, int result) +{ + simgrid::simix::marshal(simcall->result, result); } static inline double simcall_process_sleep__get__duration(smx_simcall_t simcall) @@ -123,8 +111,9 @@ static inline int simcall_process_sleep__getraw__result(smx_simcall_t simcall) { return simgrid::simix::unmarshal_raw(simcall->result); } -static inline void simcall_process_sleep__set__result(smx_simcall_t simcall, int result){ - simgrid::simix::marshal(simcall->result, result); +static inline void simcall_process_sleep__set__result(smx_simcall_t simcall, int result) +{ + simgrid::simix::marshal(simcall->result, result); } static inline const char* simcall_execution_start__get__name(smx_simcall_t simcall) @@ -175,8 +164,7 @@ static inline void simcall_execution_start__set__bound(smx_simcall_t simcall, do { simgrid::simix::marshal(simcall->args[3], arg); } -static inline boost::intrusive_ptr -simcall_execution_start__get__result(smx_simcall_t simcall) +static inline boost::intrusive_ptr simcall_execution_start__get__result(smx_simcall_t simcall) { return simgrid::simix::unmarshal>(simcall->result); } @@ -184,9 +172,7 @@ static inline simgrid::kernel::activity::ExecImpl* simcall_execution_start__getr { return simgrid::simix::unmarshal_raw(simcall->result); } -static inline void -simcall_execution_start__set__result(smx_simcall_t simcall, - boost::intrusive_ptr result) +static inline void simcall_execution_start__set__result(smx_simcall_t simcall, boost::intrusive_ptr result) { simgrid::simix::marshal>(simcall->result, result); } @@ -275,100 +261,20 @@ static inline void simcall_execution_parallel_start__set__timeout(smx_simcall_t { simgrid::simix::marshal(simcall->args[6], arg); } -static inline boost::intrusive_ptr -simcall_execution_parallel_start__get__result(smx_simcall_t simcall) +static inline boost::intrusive_ptr simcall_execution_parallel_start__get__result(smx_simcall_t simcall) { return simgrid::simix::unmarshal>(simcall->result); } -static inline simgrid::kernel::activity::ExecImpl* -simcall_execution_parallel_start__getraw__result(smx_simcall_t simcall) +static inline simgrid::kernel::activity::ExecImpl* simcall_execution_parallel_start__getraw__result(smx_simcall_t simcall) { return simgrid::simix::unmarshal_raw(simcall->result); } -static inline void -simcall_execution_parallel_start__set__result(smx_simcall_t simcall, - boost::intrusive_ptr result) +static inline void simcall_execution_parallel_start__set__result(smx_simcall_t simcall, boost::intrusive_ptr result) { simgrid::simix::marshal>(simcall->result, result); } -static inline boost::intrusive_ptr -simcall_execution_cancel__get__execution(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal>(simcall->args[0]); -} -static inline simgrid::kernel::activity::ActivityImpl* -simcall_execution_cancel__getraw__execution(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args[0]); -} -static inline void -simcall_execution_cancel__set__execution(smx_simcall_t simcall, - boost::intrusive_ptr arg) -{ - simgrid::simix::marshal>(simcall->args[0], arg); -} - -static inline boost::intrusive_ptr -simcall_execution_set_priority__get__execution(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal>(simcall->args[0]); -} -static inline simgrid::kernel::activity::ActivityImpl* -simcall_execution_set_priority__getraw__execution(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args[0]); -} -static inline void -simcall_execution_set_priority__set__execution(smx_simcall_t simcall, - boost::intrusive_ptr arg) -{ - simgrid::simix::marshal>(simcall->args[0], arg); -} -static inline double simcall_execution_set_priority__get__priority(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->args[1]); -} -static inline double simcall_execution_set_priority__getraw__priority(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args[1]); -} -static inline void simcall_execution_set_priority__set__priority(smx_simcall_t simcall, double arg) -{ - simgrid::simix::marshal(simcall->args[1], arg); -} - -static inline boost::intrusive_ptr -simcall_execution_set_bound__get__execution(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal>(simcall->args[0]); -} -static inline simgrid::kernel::activity::ActivityImpl* -simcall_execution_set_bound__getraw__execution(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args[0]); -} -static inline void -simcall_execution_set_bound__set__execution(smx_simcall_t simcall, - boost::intrusive_ptr arg) -{ - simgrid::simix::marshal>(simcall->args[0], arg); -} -static inline double simcall_execution_set_bound__get__bound(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->args[1]); -} -static inline double simcall_execution_set_bound__getraw__bound(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args[1]); -} -static inline void simcall_execution_set_bound__set__bound(smx_simcall_t simcall, double arg) -{ - simgrid::simix::marshal(simcall->args[1], arg); -} - -static inline boost::intrusive_ptr -simcall_execution_wait__get__execution(smx_simcall_t simcall) +static inline boost::intrusive_ptr simcall_execution_wait__get__execution(smx_simcall_t simcall) { return simgrid::simix::unmarshal>(simcall->args[0]); } @@ -376,9 +282,7 @@ static inline simgrid::kernel::activity::ActivityImpl* simcall_execution_wait__g { return simgrid::simix::unmarshal_raw(simcall->args[0]); } -static inline void -simcall_execution_wait__set__execution(smx_simcall_t simcall, - boost::intrusive_ptr arg) +static inline void simcall_execution_wait__set__execution(smx_simcall_t simcall, boost::intrusive_ptr arg) { simgrid::simix::marshal>(simcall->args[0], arg); } @@ -390,8 +294,9 @@ static inline int simcall_execution_wait__getraw__result(smx_simcall_t simcall) { return simgrid::simix::unmarshal_raw(simcall->result); } -static inline void simcall_execution_wait__set__result(smx_simcall_t simcall, int result){ - simgrid::simix::marshal(simcall->result, result); +static inline void simcall_execution_wait__set__result(smx_simcall_t simcall, int result) +{ + simgrid::simix::marshal(simcall->result, result); } static inline smx_actor_t simcall_process_on_exit__get__process(smx_simcall_t simcall) @@ -479,8 +384,7 @@ static inline void simcall_comm_iprobe__set__data(smx_simcall_t simcall, void* a { simgrid::simix::marshal(simcall->args[3], arg); } -static inline boost::intrusive_ptr -simcall_comm_iprobe__get__result(smx_simcall_t simcall) +static inline boost::intrusive_ptr simcall_comm_iprobe__get__result(smx_simcall_t simcall) { return simgrid::simix::unmarshal>(simcall->result); } @@ -488,9 +392,7 @@ static inline simgrid::kernel::activity::ActivityImpl* simcall_comm_iprobe__getr { return simgrid::simix::unmarshal_raw(simcall->result); } -static inline void -simcall_comm_iprobe__set__result(smx_simcall_t simcall, - boost::intrusive_ptr result) +static inline void simcall_comm_iprobe__set__result(smx_simcall_t simcall, boost::intrusive_ptr result) { simgrid::simix::marshal>(simcall->result, result); } @@ -748,8 +650,7 @@ static inline void simcall_comm_isend__set__detached(smx_simcall_t simcall, int { simgrid::simix::marshal(simcall->args[10], arg); } -static inline boost::intrusive_ptr -simcall_comm_isend__get__result(smx_simcall_t simcall) +static inline boost::intrusive_ptr simcall_comm_isend__get__result(smx_simcall_t simcall) { return simgrid::simix::unmarshal>(simcall->result); } @@ -757,8 +658,7 @@ static inline simgrid::kernel::activity::ActivityImpl* simcall_comm_isend__getra { return simgrid::simix::unmarshal_raw(simcall->result); } -static inline void simcall_comm_isend__set__result(smx_simcall_t simcall, - boost::intrusive_ptr result) +static inline void simcall_comm_isend__set__result(smx_simcall_t simcall, boost::intrusive_ptr result) { simgrid::simix::marshal>(simcall->result, result); } @@ -968,8 +868,7 @@ static inline void simcall_comm_irecv__set__rate(smx_simcall_t simcall, double a { simgrid::simix::marshal(simcall->args[7], arg); } -static inline boost::intrusive_ptr -simcall_comm_irecv__get__result(smx_simcall_t simcall) +static inline boost::intrusive_ptr simcall_comm_irecv__get__result(smx_simcall_t simcall) { return simgrid::simix::unmarshal>(simcall->result); } @@ -977,8 +876,7 @@ static inline simgrid::kernel::activity::ActivityImpl* simcall_comm_irecv__getra { return simgrid::simix::unmarshal_raw(simcall->result); } -static inline void simcall_comm_irecv__set__result(smx_simcall_t simcall, - boost::intrusive_ptr result) +static inline void simcall_comm_irecv__set__result(smx_simcall_t simcall, boost::intrusive_ptr result) { simgrid::simix::marshal>(simcall->result, result); } @@ -1015,12 +913,12 @@ static inline int simcall_comm_waitany__getraw__result(smx_simcall_t simcall) { return simgrid::simix::unmarshal_raw(simcall->result); } -static inline void simcall_comm_waitany__set__result(smx_simcall_t simcall, int result){ - simgrid::simix::marshal(simcall->result, result); +static inline void simcall_comm_waitany__set__result(smx_simcall_t simcall, int result) +{ + simgrid::simix::marshal(simcall->result, result); } -static inline boost::intrusive_ptr -simcall_comm_wait__get__comm(smx_simcall_t simcall) +static inline boost::intrusive_ptr simcall_comm_wait__get__comm(smx_simcall_t simcall) { return simgrid::simix::unmarshal>(simcall->args[0]); } @@ -1028,8 +926,7 @@ static inline simgrid::kernel::activity::ActivityImpl* simcall_comm_wait__getraw { return simgrid::simix::unmarshal_raw(simcall->args[0]); } -static inline void simcall_comm_wait__set__comm(smx_simcall_t simcall, - boost::intrusive_ptr arg) +static inline void simcall_comm_wait__set__comm(smx_simcall_t simcall, boost::intrusive_ptr arg) { simgrid::simix::marshal>(simcall->args[0], arg); } @@ -1046,8 +943,7 @@ static inline void simcall_comm_wait__set__timeout(smx_simcall_t simcall, double simgrid::simix::marshal(simcall->args[1], arg); } -static inline boost::intrusive_ptr -simcall_comm_test__get__comm(smx_simcall_t simcall) +static inline boost::intrusive_ptr simcall_comm_test__get__comm(smx_simcall_t simcall) { return simgrid::simix::unmarshal>(simcall->args[0]); } @@ -1055,8 +951,7 @@ static inline simgrid::kernel::activity::ActivityImpl* simcall_comm_test__getraw { return simgrid::simix::unmarshal_raw(simcall->args[0]); } -static inline void simcall_comm_test__set__comm(smx_simcall_t simcall, - boost::intrusive_ptr arg) +static inline void simcall_comm_test__set__comm(smx_simcall_t simcall, boost::intrusive_ptr arg) { simgrid::simix::marshal>(simcall->args[0], arg); } @@ -1068,12 +963,12 @@ static inline int simcall_comm_test__getraw__result(smx_simcall_t simcall) { return simgrid::simix::unmarshal_raw(simcall->result); } -static inline void simcall_comm_test__set__result(smx_simcall_t simcall, int result){ - simgrid::simix::marshal(simcall->result, result); +static inline void simcall_comm_test__set__result(smx_simcall_t simcall, int result) +{ + simgrid::simix::marshal(simcall->result, result); } -static inline boost::intrusive_ptr* -simcall_comm_testany__get__comms(smx_simcall_t simcall) +static inline boost::intrusive_ptr* simcall_comm_testany__get__comms(smx_simcall_t simcall) { return simgrid::simix::unmarshal*>(simcall->args[0]); } @@ -1081,8 +976,7 @@ static inline simgrid::kernel::activity::ActivityImpl** simcall_comm_testany__ge { return simgrid::simix::unmarshal_raw(simcall->args[0]); } -static inline void simcall_comm_testany__set__comms(smx_simcall_t simcall, - boost::intrusive_ptr* arg) +static inline void simcall_comm_testany__set__comms(smx_simcall_t simcall, boost::intrusive_ptr* arg) { simgrid::simix::marshal*>(simcall->args[0], arg); } @@ -1106,8 +1000,9 @@ static inline int simcall_comm_testany__getraw__result(smx_simcall_t simcall) { return simgrid::simix::unmarshal_raw(simcall->result); } -static inline void simcall_comm_testany__set__result(smx_simcall_t simcall, int result){ - simgrid::simix::marshal(simcall->result, result); +static inline void simcall_comm_testany__set__result(smx_simcall_t simcall, int result) +{ + simgrid::simix::marshal(simcall->result, result); } static inline smx_mutex_t simcall_mutex_lock__get__mutex(smx_simcall_t simcall) @@ -1143,8 +1038,22 @@ static inline int simcall_mutex_trylock__getraw__result(smx_simcall_t simcall) { return simgrid::simix::unmarshal_raw(simcall->result); } -static inline void simcall_mutex_trylock__set__result(smx_simcall_t simcall, int result){ - simgrid::simix::marshal(simcall->result, result); +static inline void simcall_mutex_trylock__set__result(smx_simcall_t simcall, int result) +{ + simgrid::simix::marshal(simcall->result, result); +} + +static inline smx_mutex_t simcall_mutex_unlock__get__mutex(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->args[0]); +} +static inline smx_mutex_t simcall_mutex_unlock__getraw__mutex(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} +static inline void simcall_mutex_unlock__set__mutex(smx_simcall_t simcall, smx_mutex_t arg) +{ + simgrid::simix::marshal(simcall->args[0], arg); } static inline smx_cond_t simcall_cond_init__get__result(smx_simcall_t simcall) @@ -1155,8 +1064,9 @@ static inline smx_cond_t simcall_cond_init__getraw__result(smx_simcall_t simcall { return simgrid::simix::unmarshal_raw(simcall->result); } -static inline void simcall_cond_init__set__result(smx_simcall_t simcall, smx_cond_t result){ - simgrid::simix::marshal(simcall->result, result); +static inline void simcall_cond_init__set__result(smx_simcall_t simcall, smx_cond_t result) +{ + simgrid::simix::marshal(simcall->result, result); } static inline smx_cond_t simcall_cond_signal__get__cond(smx_simcall_t simcall) @@ -1317,8 +1227,9 @@ static inline sg_size_t simcall_file_read__getraw__result(smx_simcall_t simcall) { return simgrid::simix::unmarshal_raw(simcall->result); } -static inline void simcall_file_read__set__result(smx_simcall_t simcall, sg_size_t result){ - simgrid::simix::marshal(simcall->result, result); +static inline void simcall_file_read__set__result(smx_simcall_t simcall, sg_size_t result) +{ + simgrid::simix::marshal(simcall->result, result); } static inline surf_file_t simcall_file_write__get__fd(smx_simcall_t simcall) @@ -1353,8 +1264,9 @@ static inline sg_size_t simcall_file_write__getraw__result(smx_simcall_t simcall { return simgrid::simix::unmarshal_raw(simcall->result); } -static inline void simcall_file_write__set__result(smx_simcall_t simcall, sg_size_t result){ - simgrid::simix::marshal(simcall->result, result); +static inline void simcall_file_write__set__result(smx_simcall_t simcall, sg_size_t result) +{ + simgrid::simix::marshal(simcall->result, result); } static inline int simcall_mc_random__get__min(smx_simcall_t simcall) @@ -1389,12 +1301,12 @@ static inline int simcall_mc_random__getraw__result(smx_simcall_t simcall) { return simgrid::simix::unmarshal_raw(simcall->result); } -static inline void simcall_mc_random__set__result(smx_simcall_t simcall, int result){ - simgrid::simix::marshal(simcall->result, result); +static inline void simcall_mc_random__set__result(smx_simcall_t simcall, int result) +{ + simgrid::simix::marshal(simcall->result, result); } -static inline boost::intrusive_ptr -simcall_set_category__get__synchro(smx_simcall_t simcall) +static inline boost::intrusive_ptr simcall_set_category__get__synchro(smx_simcall_t simcall) { return simgrid::simix::unmarshal>(simcall->args[0]); } @@ -1402,8 +1314,7 @@ static inline simgrid::kernel::activity::ActivityImpl* simcall_set_category__get { return simgrid::simix::unmarshal_raw(simcall->args[0]); } -static inline void simcall_set_category__set__synchro(smx_simcall_t simcall, - boost::intrusive_ptr arg) +static inline void simcall_set_category__set__synchro(smx_simcall_t simcall, boost::intrusive_ptr arg) { simgrid::simix::marshal>(simcall->args[0], arg); } @@ -1448,42 +1359,24 @@ static inline void simcall_run_blocking__set__code(smx_simcall_t simcall, std::f /* The prototype of all simcall handlers, automatically generated for you */ -XBT_PRIVATE void simcall_HANDLER_process_kill(smx_simcall_t simcall, smx_actor_t process); XBT_PRIVATE void simcall_HANDLER_process_killall(smx_simcall_t simcall, int reset_pid); XBT_PRIVATE void simcall_HANDLER_process_suspend(smx_simcall_t simcall, smx_actor_t process); XBT_PRIVATE void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_actor_t process, double timeout); XBT_PRIVATE void simcall_HANDLER_process_sleep(smx_simcall_t simcall, double duration); -XBT_PRIVATE boost::intrusive_ptr -simcall_HANDLER_execution_start(smx_simcall_t simcall, const char* name, double flops_amount, double priority, - double bound); -XBT_PRIVATE void -simcall_HANDLER_execution_wait(smx_simcall_t simcall, - boost::intrusive_ptr execution); -XBT_PRIVATE boost::intrusive_ptr -simcall_HANDLER_comm_iprobe(smx_simcall_t simcall, smx_mailbox_t mbox, int type, simix_match_func_t match_fun, - void* data); +XBT_PRIVATE boost::intrusive_ptr simcall_HANDLER_execution_start(smx_simcall_t simcall, const char* name, double flops_amount, double priority, double bound); +XBT_PRIVATE void simcall_HANDLER_execution_wait(smx_simcall_t simcall, boost::intrusive_ptr execution); +XBT_PRIVATE boost::intrusive_ptr simcall_HANDLER_comm_iprobe(smx_simcall_t simcall, smx_mailbox_t mbox, int type, simix_match_func_t match_fun, void* data); XBT_PRIVATE void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout); -XBT_PRIVATE boost::intrusive_ptr -simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, - void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, - simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, - int detached); +XBT_PRIVATE boost::intrusive_ptr simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached); XBT_PRIVATE void simcall_HANDLER_comm_recv(smx_simcall_t simcall, smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate); -XBT_PRIVATE boost::intrusive_ptr -simcall_HANDLER_comm_irecv(smx_simcall_t simcall, smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, - size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, - void* data, double rate); +XBT_PRIVATE boost::intrusive_ptr simcall_HANDLER_comm_irecv(smx_simcall_t simcall, smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate); XBT_PRIVATE void simcall_HANDLER_comm_waitany(smx_simcall_t simcall, xbt_dynar_t comms, double timeout); -XBT_PRIVATE void simcall_HANDLER_comm_wait(smx_simcall_t simcall, - boost::intrusive_ptr comm, - double timeout); -XBT_PRIVATE void simcall_HANDLER_comm_test(smx_simcall_t simcall, - boost::intrusive_ptr comm); -XBT_PRIVATE void simcall_HANDLER_comm_testany(smx_simcall_t simcall, - boost::intrusive_ptr* comms, - size_t count); +XBT_PRIVATE void simcall_HANDLER_comm_wait(smx_simcall_t simcall, boost::intrusive_ptr comm, double timeout); +XBT_PRIVATE void simcall_HANDLER_comm_test(smx_simcall_t simcall, boost::intrusive_ptr comm); +XBT_PRIVATE void simcall_HANDLER_comm_testany(smx_simcall_t simcall, boost::intrusive_ptr* comms, size_t count); XBT_PRIVATE void simcall_HANDLER_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex); XBT_PRIVATE int simcall_HANDLER_mutex_trylock(smx_simcall_t simcall, smx_mutex_t mutex); +XBT_PRIVATE void simcall_HANDLER_mutex_unlock(smx_simcall_t simcall, smx_mutex_t mutex); XBT_PRIVATE void simcall_HANDLER_cond_wait(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex); XBT_PRIVATE void simcall_HANDLER_cond_wait_timeout(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex, double timeout); XBT_PRIVATE void simcall_HANDLER_sem_acquire(smx_simcall_t simcall, smx_sem_t sem);