X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5ec40848d0e955398460c1d2a1036b3f3f1878ea..eb92e377b2afbcdaae55d0819b5c226091d25d49:/src/simix/popping_accessors.hpp diff --git a/src/simix/popping_accessors.hpp b/src/simix/popping_accessors.hpp index 0e08a069a2..d175c0d692 100644 --- a/src/simix/popping_accessors.hpp +++ b/src/simix/popping_accessors.hpp @@ -98,8 +98,7 @@ static inline simgrid::kernel::activity::ExecImpl* simcall_execution_wait__getra { return simgrid::simix::unmarshal_raw(simcall->args[0]); } -static inline void simcall_execution_wait__set__execution(smx_simcall_t simcall, - simgrid::kernel::activity::ExecImpl* arg) +static inline void simcall_execution_wait__set__execution(smx_simcall_t simcall, simgrid::kernel::activity::ExecImpl* arg) { simgrid::simix::marshal(simcall->args[0], arg); } @@ -116,6 +115,55 @@ static inline void simcall_execution_wait__set__result(smx_simcall_t simcall, in simgrid::simix::marshal(simcall->result, result); } +static inline simgrid::kernel::activity::ExecImpl** simcall_execution_waitany_for__get__execs(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->args[0]); +} +static inline simgrid::kernel::activity::ExecImpl** simcall_execution_waitany_for__getraw__execs(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[0]); +} +static inline void simcall_execution_waitany_for__set__execs(smx_simcall_t simcall, simgrid::kernel::activity::ExecImpl** arg) +{ + simgrid::simix::marshal(simcall->args[0], arg); +} +static inline size_t simcall_execution_waitany_for__get__count(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->args[1]); +} +static inline size_t simcall_execution_waitany_for__getraw__count(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[1]); +} +static inline void simcall_execution_waitany_for__set__count(smx_simcall_t simcall, size_t arg) +{ + simgrid::simix::marshal(simcall->args[1], arg); +} +static inline double simcall_execution_waitany_for__get__timeout(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->args[2]); +} +static inline double simcall_execution_waitany_for__getraw__timeout(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->args[2]); +} +static inline void simcall_execution_waitany_for__set__timeout(smx_simcall_t simcall, double arg) +{ + simgrid::simix::marshal(simcall->args[2], arg); +} +static inline int simcall_execution_waitany_for__get__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal(simcall->result); +} +static inline int simcall_execution_waitany_for__getraw__result(smx_simcall_t simcall) +{ + return simgrid::simix::unmarshal_raw(simcall->result); +} +static inline void simcall_execution_waitany_for__set__result(smx_simcall_t simcall, int result) +{ + simgrid::simix::marshal(simcall->result, result); +} + static inline simgrid::kernel::activity::ExecImpl* simcall_execution_test__get__execution(smx_simcall_t simcall) { return simgrid::simix::unmarshal(simcall->args[0]); @@ -124,22 +172,21 @@ static inline simgrid::kernel::activity::ExecImpl* simcall_execution_test__getra { return simgrid::simix::unmarshal_raw(simcall->args[0]); } -static inline void simcall_execution_test__set__execution(smx_simcall_t simcall, - simgrid::kernel::activity::ExecImpl* arg) +static inline void simcall_execution_test__set__execution(smx_simcall_t simcall, simgrid::kernel::activity::ExecImpl* arg) { simgrid::simix::marshal(simcall->args[0], arg); } -static inline int simcall_execution_test__get__result(smx_simcall_t simcall) +static inline bool simcall_execution_test__get__result(smx_simcall_t simcall) { - return simgrid::simix::unmarshal(simcall->result); + return simgrid::simix::unmarshal(simcall->result); } -static inline int simcall_execution_test__getraw__result(smx_simcall_t simcall) +static inline bool simcall_execution_test__getraw__result(smx_simcall_t simcall) { - return simgrid::simix::unmarshal_raw(simcall->result); + return simgrid::simix::unmarshal_raw(simcall->result); } -static inline void simcall_execution_test__set__result(smx_simcall_t simcall, int result) +static inline void simcall_execution_test__set__result(smx_simcall_t simcall, bool result) { - simgrid::simix::marshal(simcall->result, result); + simgrid::simix::marshal(simcall->result, result); } static inline smx_actor_t simcall_comm_send__get__sender(smx_simcall_t simcall) @@ -190,17 +237,17 @@ static inline void simcall_comm_send__set__rate(smx_simcall_t simcall, double ar { simgrid::simix::marshal(simcall->args[3], arg); } -static inline void* simcall_comm_send__get__src_buff(smx_simcall_t simcall) +static inline unsigned char* simcall_comm_send__get__src_buff(smx_simcall_t simcall) { - return simgrid::simix::unmarshal(simcall->args[4]); + return simgrid::simix::unmarshal(simcall->args[4]); } -static inline void* simcall_comm_send__getraw__src_buff(smx_simcall_t simcall) +static inline unsigned char* simcall_comm_send__getraw__src_buff(smx_simcall_t simcall) { - return simgrid::simix::unmarshal_raw(simcall->args[4]); + return simgrid::simix::unmarshal_raw(simcall->args[4]); } -static inline void simcall_comm_send__set__src_buff(smx_simcall_t simcall, void* arg) +static inline void simcall_comm_send__set__src_buff(smx_simcall_t simcall, unsigned char* arg) { - simgrid::simix::marshal(simcall->args[4], arg); + simgrid::simix::marshal(simcall->args[4], arg); } static inline size_t simcall_comm_send__get__src_buff_size(smx_simcall_t simcall) { @@ -311,17 +358,17 @@ static inline void simcall_comm_isend__set__rate(smx_simcall_t simcall, double a { simgrid::simix::marshal(simcall->args[3], arg); } -static inline void* simcall_comm_isend__get__src_buff(smx_simcall_t simcall) +static inline unsigned char* simcall_comm_isend__get__src_buff(smx_simcall_t simcall) { - return simgrid::simix::unmarshal(simcall->args[4]); + return simgrid::simix::unmarshal(simcall->args[4]); } -static inline void* simcall_comm_isend__getraw__src_buff(smx_simcall_t simcall) +static inline unsigned char* simcall_comm_isend__getraw__src_buff(smx_simcall_t simcall) { - return simgrid::simix::unmarshal_raw(simcall->args[4]); + return simgrid::simix::unmarshal_raw(simcall->args[4]); } -static inline void simcall_comm_isend__set__src_buff(smx_simcall_t simcall, void* arg) +static inline void simcall_comm_isend__set__src_buff(smx_simcall_t simcall, unsigned char* arg) { - simgrid::simix::marshal(simcall->args[4], arg); + simgrid::simix::marshal(simcall->args[4], arg); } static inline size_t simcall_comm_isend__get__src_buff_size(smx_simcall_t simcall) { @@ -383,17 +430,17 @@ static inline void simcall_comm_isend__set__data(smx_simcall_t simcall, void* ar { simgrid::simix::marshal(simcall->args[9], arg); } -static inline int simcall_comm_isend__get__detached(smx_simcall_t simcall) +static inline bool simcall_comm_isend__get__detached(smx_simcall_t simcall) { - return simgrid::simix::unmarshal(simcall->args[10]); + return simgrid::simix::unmarshal(simcall->args[10]); } -static inline int simcall_comm_isend__getraw__detached(smx_simcall_t simcall) +static inline bool simcall_comm_isend__getraw__detached(smx_simcall_t simcall) { - return simgrid::simix::unmarshal_raw(simcall->args[10]); + return simgrid::simix::unmarshal_raw(simcall->args[10]); } -static inline void simcall_comm_isend__set__detached(smx_simcall_t simcall, int arg) +static inline void simcall_comm_isend__set__detached(smx_simcall_t simcall, bool arg) { - simgrid::simix::marshal(simcall->args[10], arg); + simgrid::simix::marshal(simcall->args[10], arg); } static inline boost::intrusive_ptr simcall_comm_isend__get__result(smx_simcall_t simcall) { @@ -432,17 +479,17 @@ static inline void simcall_comm_recv__set__mbox(smx_simcall_t simcall, smx_mailb { simgrid::simix::marshal(simcall->args[1], arg); } -static inline void* simcall_comm_recv__get__dst_buff(smx_simcall_t simcall) +static inline unsigned char* simcall_comm_recv__get__dst_buff(smx_simcall_t simcall) { - return simgrid::simix::unmarshal(simcall->args[2]); + return simgrid::simix::unmarshal(simcall->args[2]); } -static inline void* simcall_comm_recv__getraw__dst_buff(smx_simcall_t simcall) +static inline unsigned char* simcall_comm_recv__getraw__dst_buff(smx_simcall_t simcall) { - return simgrid::simix::unmarshal_raw(simcall->args[2]); + return simgrid::simix::unmarshal_raw(simcall->args[2]); } -static inline void simcall_comm_recv__set__dst_buff(smx_simcall_t simcall, void* arg) +static inline void simcall_comm_recv__set__dst_buff(smx_simcall_t simcall, unsigned char* arg) { - simgrid::simix::marshal(simcall->args[2], arg); + simgrid::simix::marshal(simcall->args[2], arg); } static inline size_t* simcall_comm_recv__get__dst_buff_size(smx_simcall_t simcall) { @@ -541,17 +588,17 @@ static inline void simcall_comm_irecv__set__mbox(smx_simcall_t simcall, smx_mail { simgrid::simix::marshal(simcall->args[1], arg); } -static inline void* simcall_comm_irecv__get__dst_buff(smx_simcall_t simcall) +static inline unsigned char* simcall_comm_irecv__get__dst_buff(smx_simcall_t simcall) { - return simgrid::simix::unmarshal(simcall->args[2]); + return simgrid::simix::unmarshal(simcall->args[2]); } -static inline void* simcall_comm_irecv__getraw__dst_buff(smx_simcall_t simcall) +static inline unsigned char* simcall_comm_irecv__getraw__dst_buff(smx_simcall_t simcall) { - return simgrid::simix::unmarshal_raw(simcall->args[2]); + return simgrid::simix::unmarshal_raw(simcall->args[2]); } -static inline void simcall_comm_irecv__set__dst_buff(smx_simcall_t simcall, void* arg) +static inline void simcall_comm_irecv__set__dst_buff(smx_simcall_t simcall, unsigned char* arg) { - simgrid::simix::marshal(simcall->args[2], arg); + simgrid::simix::marshal(simcall->args[2], arg); } static inline size_t* simcall_comm_irecv__get__dst_buff_size(smx_simcall_t simcall) { @@ -626,19 +673,17 @@ static inline void simcall_comm_irecv__set__result(smx_simcall_t simcall, boost: simgrid::simix::marshal>(simcall->result, result); } -static inline boost::intrusive_ptr* -simcall_comm_waitany__get__comms(smx_simcall_t simcall) +static inline simgrid::kernel::activity::CommImpl** simcall_comm_waitany__get__comms(smx_simcall_t simcall) { - return simgrid::simix::unmarshal*>(simcall->args[0]); + return simgrid::simix::unmarshal(simcall->args[0]); } -static inline simgrid::kernel::activity::ActivityImpl** simcall_comm_waitany__getraw__comms(smx_simcall_t simcall) +static inline simgrid::kernel::activity::CommImpl** simcall_comm_waitany__getraw__comms(smx_simcall_t simcall) { - return simgrid::simix::unmarshal_raw(simcall->args[0]); + return simgrid::simix::unmarshal_raw(simcall->args[0]); } -static inline void simcall_comm_waitany__set__comms(smx_simcall_t simcall, - boost::intrusive_ptr* arg) +static inline void simcall_comm_waitany__set__comms(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl** arg) { - simgrid::simix::marshal*>(simcall->args[0], arg); + simgrid::simix::marshal(simcall->args[0], arg); } static inline size_t simcall_comm_waitany__get__count(smx_simcall_t simcall) { @@ -714,30 +759,30 @@ static inline void simcall_comm_test__set__comm(smx_simcall_t simcall, simgrid:: { simgrid::simix::marshal(simcall->args[0], arg); } -static inline int simcall_comm_test__get__result(smx_simcall_t simcall) +static inline bool simcall_comm_test__get__result(smx_simcall_t simcall) { - return simgrid::simix::unmarshal(simcall->result); + return simgrid::simix::unmarshal(simcall->result); } -static inline int simcall_comm_test__getraw__result(smx_simcall_t simcall) +static inline bool simcall_comm_test__getraw__result(smx_simcall_t simcall) { - return simgrid::simix::unmarshal_raw(simcall->result); + return simgrid::simix::unmarshal_raw(simcall->result); } -static inline void simcall_comm_test__set__result(smx_simcall_t simcall, int result) +static inline void simcall_comm_test__set__result(smx_simcall_t simcall, bool result) { - simgrid::simix::marshal(simcall->result, result); + simgrid::simix::marshal(simcall->result, result); } -static inline boost::intrusive_ptr* simcall_comm_testany__get__comms(smx_simcall_t simcall) +static inline simgrid::kernel::activity::CommImpl** simcall_comm_testany__get__comms(smx_simcall_t simcall) { - return simgrid::simix::unmarshal*>(simcall->args[0]); + return simgrid::simix::unmarshal(simcall->args[0]); } -static inline simgrid::kernel::activity::ActivityImpl** simcall_comm_testany__getraw__comms(smx_simcall_t simcall) +static inline simgrid::kernel::activity::CommImpl** simcall_comm_testany__getraw__comms(smx_simcall_t simcall) { - return simgrid::simix::unmarshal_raw(simcall->args[0]); + 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, simgrid::kernel::activity::CommImpl** arg) { - simgrid::simix::marshal*>(simcall->args[0], arg); + simgrid::simix::marshal(simcall->args[0], arg); } static inline size_t simcall_comm_testany__get__count(smx_simcall_t simcall) { @@ -1033,18 +1078,16 @@ XBT_PRIVATE void simcall_HANDLER_process_suspend(smx_simcall_t simcall, smx_acto 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 void simcall_HANDLER_execution_wait(smx_simcall_t simcall, simgrid::kernel::activity::ExecImpl* execution); +XBT_PRIVATE void simcall_HANDLER_execution_waitany_for(smx_simcall_t simcall, simgrid::kernel::activity::ExecImpl** execs, size_t count, double timeout); XBT_PRIVATE void simcall_HANDLER_execution_test(smx_simcall_t simcall, simgrid::kernel::activity::ExecImpl* execution); -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 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 void simcall_HANDLER_comm_waitany(smx_simcall_t simcall, - boost::intrusive_ptr* comms, - size_t count, double timeout); -XBT_PRIVATE void simcall_HANDLER_comm_wait(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl* comm, - double timeout); +XBT_PRIVATE void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, unsigned char* 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, unsigned char* 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, bool detached); +XBT_PRIVATE void simcall_HANDLER_comm_recv(smx_simcall_t simcall, smx_actor_t receiver, smx_mailbox_t mbox, unsigned char* 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, unsigned char* 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, simgrid::kernel::activity::CommImpl** comms, size_t count, double timeout); +XBT_PRIVATE void simcall_HANDLER_comm_wait(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl* comm, double timeout); XBT_PRIVATE void simcall_HANDLER_comm_test(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl* 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_testany(smx_simcall_t simcall, simgrid::kernel::activity::CommImpl** 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); @@ -1053,4 +1096,4 @@ XBT_PRIVATE void simcall_HANDLER_cond_wait_timeout(smx_simcall_t simcall, smx_co XBT_PRIVATE void simcall_HANDLER_sem_acquire(smx_simcall_t simcall, smx_sem_t sem); XBT_PRIVATE void simcall_HANDLER_sem_acquire_timeout(smx_simcall_t simcall, smx_sem_t sem, double timeout); XBT_PRIVATE void simcall_HANDLER_io_wait(smx_simcall_t simcall, simgrid::kernel::activity::IoImpl* io); -XBT_PRIVATE int simcall_HANDLER_mc_random(smx_simcall_t simcall, int min, int max); \ No newline at end of file +XBT_PRIVATE int simcall_HANDLER_mc_random(smx_simcall_t simcall, int min, int max);