X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/686336f25198e15f4d846d7639b5f221587b50b0..8f9f22a96a9349e7a1e2bea57ab8cd1361b93a8a:/src/simix/popping_generated.cpp diff --git a/src/simix/popping_generated.cpp b/src/simix/popping_generated.cpp index 71542d49b6..98f51cf723 100644 --- a/src/simix/popping_generated.cpp +++ b/src/simix/popping_generated.cpp @@ -30,6 +30,7 @@ const char* simcall_names[] = { "SIMCALL_PROCESS_JOIN", "SIMCALL_PROCESS_SLEEP", "SIMCALL_EXECUTION_WAIT", + "SIMCALL_EXECUTION_WAITANY_FOR", "SIMCALL_EXECUTION_TEST", "SIMCALL_COMM_SEND", "SIMCALL_COMM_ISEND", @@ -63,112 +64,118 @@ void SIMIX_simcall_handle(smx_simcall_t simcall, int value) { if (simcall->issuer->context_->iwannadie) return; switch (simcall->call) { -case SIMCALL_PROCESS_SUSPEND: - simcall_HANDLER_process_suspend(simcall, simgrid::simix::unmarshal(simcall->args[0])); - break; - -case SIMCALL_PROCESS_JOIN: - simcall_HANDLER_process_join(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1])); - break; - -case SIMCALL_PROCESS_SLEEP: - simcall_HANDLER_process_sleep(simcall, simgrid::simix::unmarshal(simcall->args[0])); - break; - -case SIMCALL_EXECUTION_WAIT: - simcall_HANDLER_execution_wait(simcall, simgrid::simix::unmarshal(simcall->args[0])); - break; - -case SIMCALL_EXECUTION_TEST: - simcall_HANDLER_execution_test(simcall, simgrid::simix::unmarshal(simcall->args[0])); - break; - -case SIMCALL_COMM_SEND: - simcall_HANDLER_comm_send(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), simgrid::simix::unmarshal(simcall->args[2]), simgrid::simix::unmarshal(simcall->args[3]), simgrid::simix::unmarshal(simcall->args[4]), simgrid::simix::unmarshal(simcall->args[5]), simgrid::simix::unmarshal(simcall->args[6]), simgrid::simix::unmarshal(simcall->args[7]), simgrid::simix::unmarshal(simcall->args[8]), simgrid::simix::unmarshal(simcall->args[9])); - break; - -case SIMCALL_COMM_ISEND: - simgrid::simix::marshal>(simcall->result, simcall_HANDLER_comm_isend(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), simgrid::simix::unmarshal(simcall->args[2]), simgrid::simix::unmarshal(simcall->args[3]), simgrid::simix::unmarshal(simcall->args[4]), simgrid::simix::unmarshal(simcall->args[5]), simgrid::simix::unmarshal(simcall->args[6]), simgrid::simix::unmarshal(simcall->args[7]), simgrid::simix::unmarshal(simcall->args[8]), simgrid::simix::unmarshal(simcall->args[9]), simgrid::simix::unmarshal(simcall->args[10]))); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_COMM_RECV: - simcall_HANDLER_comm_recv(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), simgrid::simix::unmarshal(simcall->args[2]), simgrid::simix::unmarshal(simcall->args[3]), simgrid::simix::unmarshal(simcall->args[4]), simgrid::simix::unmarshal(simcall->args[5]), simgrid::simix::unmarshal(simcall->args[6]), simgrid::simix::unmarshal(simcall->args[7]), simgrid::simix::unmarshal(simcall->args[8])); - break; - -case SIMCALL_COMM_IRECV: - simgrid::simix::marshal>(simcall->result, simcall_HANDLER_comm_irecv(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), simgrid::simix::unmarshal(simcall->args[2]), simgrid::simix::unmarshal(simcall->args[3]), simgrid::simix::unmarshal(simcall->args[4]), simgrid::simix::unmarshal(simcall->args[5]), simgrid::simix::unmarshal(simcall->args[6]), simgrid::simix::unmarshal(simcall->args[7]))); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_COMM_WAITANY: - simcall_HANDLER_comm_waitany(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), simgrid::simix::unmarshal(simcall->args[2])); - break; - -case SIMCALL_COMM_WAIT: - simcall_HANDLER_comm_wait(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1])); - break; - -case SIMCALL_COMM_TEST: - simcall_HANDLER_comm_test(simcall, simgrid::simix::unmarshal(simcall->args[0])); - break; - -case SIMCALL_COMM_TESTANY: - simcall_HANDLER_comm_testany(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1])); - break; - -case SIMCALL_MUTEX_LOCK: - simcall_HANDLER_mutex_lock(simcall, simgrid::simix::unmarshal(simcall->args[0])); - break; - -case SIMCALL_MUTEX_TRYLOCK: - simgrid::simix::marshal(simcall->result, simcall_HANDLER_mutex_trylock(simcall, simgrid::simix::unmarshal(simcall->args[0]))); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_MUTEX_UNLOCK: - simcall_HANDLER_mutex_unlock(simcall, simgrid::simix::unmarshal(simcall->args[0])); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_COND_WAIT: - simcall_HANDLER_cond_wait(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1])); - break; - -case SIMCALL_COND_WAIT_TIMEOUT: - simcall_HANDLER_cond_wait_timeout(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), simgrid::simix::unmarshal(simcall->args[2])); - break; - -case SIMCALL_SEM_ACQUIRE: - simcall_HANDLER_sem_acquire(simcall, simgrid::simix::unmarshal(simcall->args[0])); - break; - -case SIMCALL_SEM_ACQUIRE_TIMEOUT: - simcall_HANDLER_sem_acquire_timeout(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1])); - break; - -case SIMCALL_IO_WAIT: - simcall_HANDLER_io_wait(simcall, simgrid::simix::unmarshal(simcall->args[0])); - break; - -case SIMCALL_MC_RANDOM: - simgrid::simix::marshal(simcall->result, simcall_HANDLER_mc_random(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]))); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_RUN_KERNEL: - SIMIX_run_kernel(simgrid::simix::unmarshal const*>(simcall->args[0])); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_RUN_BLOCKING: - SIMIX_run_blocking(simgrid::simix::unmarshal const*>(simcall->args[0])); - break; + case SIMCALL_PROCESS_SUSPEND: + simcall_HANDLER_process_suspend(simcall, simgrid::simix::unmarshal(simcall->args[0])); + break; + + case SIMCALL_PROCESS_JOIN: + simcall_HANDLER_process_join(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1])); + break; + + case SIMCALL_PROCESS_SLEEP: + simcall_HANDLER_process_sleep(simcall, simgrid::simix::unmarshal(simcall->args[0])); + break; + + case SIMCALL_EXECUTION_WAIT: + simcall_HANDLER_execution_wait(simcall, simgrid::simix::unmarshal(simcall->args[0])); + break; + + case SIMCALL_EXECUTION_WAITANY_FOR: + simcall_HANDLER_execution_waitany_for(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), simgrid::simix::unmarshal(simcall->args[2])); + break; + + case SIMCALL_EXECUTION_TEST: + simcall_HANDLER_execution_test(simcall, simgrid::simix::unmarshal(simcall->args[0])); + break; + + case SIMCALL_COMM_SEND: + simcall_HANDLER_comm_send(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), simgrid::simix::unmarshal(simcall->args[2]), simgrid::simix::unmarshal(simcall->args[3]), simgrid::simix::unmarshal(simcall->args[4]), simgrid::simix::unmarshal(simcall->args[5]), simgrid::simix::unmarshal(simcall->args[6]), simgrid::simix::unmarshal(simcall->args[7]), simgrid::simix::unmarshal(simcall->args[8]), simgrid::simix::unmarshal(simcall->args[9])); + break; + + case SIMCALL_COMM_ISEND: + simgrid::simix::marshal>(simcall->result, simcall_HANDLER_comm_isend(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), simgrid::simix::unmarshal(simcall->args[2]), simgrid::simix::unmarshal(simcall->args[3]), simgrid::simix::unmarshal(simcall->args[4]), simgrid::simix::unmarshal(simcall->args[5]), simgrid::simix::unmarshal(simcall->args[6]), simgrid::simix::unmarshal(simcall->args[7]), simgrid::simix::unmarshal(simcall->args[8]), simgrid::simix::unmarshal(simcall->args[9]), simgrid::simix::unmarshal(simcall->args[10]))); + SIMIX_simcall_answer(simcall); + break; + + case SIMCALL_COMM_RECV: + simcall_HANDLER_comm_recv(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), simgrid::simix::unmarshal(simcall->args[2]), simgrid::simix::unmarshal(simcall->args[3]), simgrid::simix::unmarshal(simcall->args[4]), simgrid::simix::unmarshal(simcall->args[5]), simgrid::simix::unmarshal(simcall->args[6]), simgrid::simix::unmarshal(simcall->args[7]), simgrid::simix::unmarshal(simcall->args[8])); + break; + + case SIMCALL_COMM_IRECV: + simgrid::simix::marshal>(simcall->result, simcall_HANDLER_comm_irecv(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), simgrid::simix::unmarshal(simcall->args[2]), simgrid::simix::unmarshal(simcall->args[3]), simgrid::simix::unmarshal(simcall->args[4]), simgrid::simix::unmarshal(simcall->args[5]), simgrid::simix::unmarshal(simcall->args[6]), simgrid::simix::unmarshal(simcall->args[7]))); + SIMIX_simcall_answer(simcall); + break; + + case SIMCALL_COMM_WAITANY: + simcall_HANDLER_comm_waitany(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), simgrid::simix::unmarshal(simcall->args[2])); + break; + + case SIMCALL_COMM_WAIT: + simcall_HANDLER_comm_wait(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1])); + break; + + case SIMCALL_COMM_TEST: + simcall_HANDLER_comm_test(simcall, simgrid::simix::unmarshal(simcall->args[0])); + break; + + case SIMCALL_COMM_TESTANY: + simcall_HANDLER_comm_testany(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1])); + break; + + case SIMCALL_MUTEX_LOCK: + simcall_HANDLER_mutex_lock(simcall, simgrid::simix::unmarshal(simcall->args[0])); + break; + + case SIMCALL_MUTEX_TRYLOCK: + simgrid::simix::marshal(simcall->result, simcall_HANDLER_mutex_trylock(simcall, simgrid::simix::unmarshal(simcall->args[0]))); + SIMIX_simcall_answer(simcall); + break; + + case SIMCALL_MUTEX_UNLOCK: + simcall_HANDLER_mutex_unlock(simcall, simgrid::simix::unmarshal(simcall->args[0])); + SIMIX_simcall_answer(simcall); + break; + + case SIMCALL_COND_WAIT: + simcall_HANDLER_cond_wait(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1])); + break; + + case SIMCALL_COND_WAIT_TIMEOUT: + simcall_HANDLER_cond_wait_timeout(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]), simgrid::simix::unmarshal(simcall->args[2])); + break; + + case SIMCALL_SEM_ACQUIRE: + simcall_HANDLER_sem_acquire(simcall, simgrid::simix::unmarshal(simcall->args[0])); + break; + + case SIMCALL_SEM_ACQUIRE_TIMEOUT: + simcall_HANDLER_sem_acquire_timeout(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1])); + break; + + case SIMCALL_IO_WAIT: + simcall_HANDLER_io_wait(simcall, simgrid::simix::unmarshal(simcall->args[0])); + break; + + case SIMCALL_MC_RANDOM: + simgrid::simix::marshal(simcall->result, simcall_HANDLER_mc_random(simcall, simgrid::simix::unmarshal(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1]))); + SIMIX_simcall_answer(simcall); + break; + + case SIMCALL_RUN_KERNEL: + SIMIX_run_kernel(simgrid::simix::unmarshal const*>(simcall->args[0])); + SIMIX_simcall_answer(simcall); + break; + + case SIMCALL_RUN_BLOCKING: + SIMIX_run_blocking(simgrid::simix::unmarshal const*>(simcall->args[0])); + break; + case NUM_SIMCALLS: break; case SIMCALL_NONE: - THROWF(arg_error, 0, "Asked to do the noop syscall on %s@%s", simcall->issuer->get_cname(), - sg_host_get_name(simcall->issuer->get_host())); + throw std::invalid_argument(simgrid::xbt::string_printf("Asked to do the noop syscall on %s@%s", + simcall->issuer->get_cname(), + sg_host_get_name(simcall->issuer->get_host()))); default: THROW_IMPOSSIBLE; }