X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/02404789a4fb72d4fdda2422bc9ca8f9f25dd9da..421864cfa538f76e5c01cd41e8cca8d105b350b1:/include/simgrid/simix.h diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index e80e3b669f..edaa5660af 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2010, 2012-2014. The SimGrid Team. +/* Copyright (c) 2007-2010, 2012-2015. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -261,7 +261,7 @@ XBT_PUBLIC(void) SIMIX_process_set_function(const char* process_host, /*********************************** Host *************************************/ XBT_PUBLIC(sg_host_t) SIMIX_host_self(void); XBT_PUBLIC(const char*) SIMIX_host_self_get_name(void); -#define SIMIX_host_get_name(h) sg_host_name(h) /* DEPRECATED: SIMIX_host_get_name */ +#define SIMIX_host_get_name(h) sg_host_get_name(h) /* DEPRECATED: SIMIX_host_get_name */ XBT_PUBLIC(void) SIMIX_host_on(sg_host_t host); XBT_PUBLIC(void) SIMIX_host_off(sg_host_t host, smx_process_t issuer); XBT_PUBLIC(void) SIMIX_host_self_set_data(void *data); @@ -298,47 +298,37 @@ XBT_PUBLIC(void) SIMIX_comm_finish(smx_synchro_t synchro); /******************************* Host simcalls ********************************/ /* TODO use handlers and keep sg_host_t hidden from higher levels */ -XBT_PUBLIC(const char *) simcall_host_get_name(sg_host_t host); XBT_PUBLIC(xbt_dict_t) simcall_host_get_properties(sg_host_t host); XBT_PUBLIC(void) simcall_host_on(sg_host_t host); XBT_PUBLIC(void) simcall_host_off(sg_host_t host); -XBT_PUBLIC(int) simcall_host_get_core(sg_host_t host); XBT_PUBLIC(xbt_swag_t) simcall_host_get_process_list(sg_host_t host); -XBT_PUBLIC(double) simcall_host_get_speed(sg_host_t host); -XBT_PUBLIC(double) simcall_host_get_available_speed(sg_host_t host); -/* Two possible states, 1 - CPU ON and 0 CPU OFF */ -XBT_PUBLIC(int) simcall_host_get_state(sg_host_t host); -XBT_PUBLIC(void *) simcall_host_get_data(sg_host_t host); XBT_PUBLIC(void) simcall_host_set_data(sg_host_t host, void *data); XBT_PUBLIC(double) simcall_host_get_current_power_peak(sg_host_t host); XBT_PUBLIC(double) simcall_host_get_power_peak_at(sg_host_t host, int pstate_index); -XBT_PUBLIC(int) simcall_host_get_nb_pstates(sg_host_t host); XBT_PUBLIC(void) simcall_host_set_pstate(sg_host_t host, int pstate_index); -XBT_PUBLIC(int) simcall_host_get_pstate(sg_host_t host); -XBT_PUBLIC(double) simcall_host_get_consumed_energy(sg_host_t host); XBT_PUBLIC(double) simcall_host_get_wattmin_at(sg_host_t host, int pstate); XBT_PUBLIC(double) simcall_host_get_wattmax_at(sg_host_t host, int pstate); -XBT_PUBLIC(smx_synchro_t) simcall_host_execute(const char *name, sg_host_t host, +XBT_PUBLIC(smx_synchro_t) simcall_process_execute(const char *name, double flops_amount, double priority, double bound, unsigned long affinity_mask); -XBT_PUBLIC(smx_synchro_t) simcall_host_parallel_execute(const char *name, +XBT_PUBLIC(smx_synchro_t) simcall_process_parallel_execute(const char *name, int host_nb, sg_host_t *host_list, double *flops_amount, double *bytes_amount, double amount, double rate); -XBT_PUBLIC(void) simcall_host_execution_destroy(smx_synchro_t execution); -XBT_PUBLIC(void) simcall_host_execution_cancel(smx_synchro_t execution); -XBT_PUBLIC(double) simcall_host_execution_get_remains(smx_synchro_t execution); -XBT_PUBLIC(e_smx_state_t) simcall_host_execution_get_state(smx_synchro_t execution); -XBT_PUBLIC(void) simcall_host_execution_set_priority(smx_synchro_t execution, double priority); -XBT_PUBLIC(void) simcall_host_execution_set_bound(smx_synchro_t execution, double bound); -XBT_PUBLIC(void) simcall_host_execution_set_affinity(smx_synchro_t execution, sg_host_t host, unsigned long mask); -XBT_PUBLIC(e_smx_state_t) simcall_host_execution_wait(smx_synchro_t execution); +XBT_PUBLIC(void) simcall_process_execution_destroy(smx_synchro_t execution); +XBT_PUBLIC(void) simcall_process_execution_cancel(smx_synchro_t execution); +XBT_PUBLIC(double) simcall_process_execution_get_remains(smx_synchro_t execution); +XBT_PUBLIC(e_smx_state_t) simcall_process_execution_get_state(smx_synchro_t execution); +XBT_PUBLIC(void) simcall_process_execution_set_priority(smx_synchro_t execution, double priority); +XBT_PUBLIC(void) simcall_process_execution_set_bound(smx_synchro_t execution, double bound); +XBT_PUBLIC(void) simcall_process_execution_set_affinity(smx_synchro_t execution, sg_host_t host, unsigned long mask); +XBT_PUBLIC(e_smx_state_t) simcall_process_execution_wait(smx_synchro_t execution); XBT_PUBLIC(xbt_dict_t) simcall_host_get_mounted_storage_list(sg_host_t host); XBT_PUBLIC(xbt_dynar_t) simcall_host_get_attached_storage_list(sg_host_t host); XBT_PUBLIC(void) simcall_host_get_params(sg_host_t vm, vm_params_t param); @@ -379,8 +369,6 @@ XBT_PUBLIC(void) SIMIX_process_throw(smx_process_t process, xbt_errcat_t cat, in /* Process handling */ XBT_PUBLIC(void) simcall_process_cleanup(smx_process_t process); -XBT_PUBLIC(void) simcall_process_change_host(smx_process_t process, - sg_host_t dest); XBT_PUBLIC(void) simcall_process_suspend(smx_process_t process); XBT_PUBLIC(void) simcall_process_resume(smx_process_t process); @@ -388,6 +376,7 @@ XBT_PUBLIC(void) simcall_process_resume(smx_process_t process); XBT_PUBLIC(int) simcall_process_count(void); XBT_PUBLIC(void *) simcall_process_get_data(smx_process_t process); XBT_PUBLIC(void) simcall_process_set_data(smx_process_t process, void *data); +XBT_PUBLIC(void) simcall_process_set_host(smx_process_t process, sg_host_t dest); XBT_PUBLIC(sg_host_t) simcall_process_get_host(smx_process_t process); XBT_PUBLIC(const char *) simcall_process_get_name(smx_process_t process); XBT_PUBLIC(int) simcall_process_get_PID(smx_process_t process); @@ -418,14 +407,14 @@ XBT_PUBLIC(xbt_dict_t) SIMIX_get_rdv_points(void); /***** Communication simcalls *****/ -XBT_PUBLIC(void) simcall_comm_send(smx_process_t src, smx_rdv_t rdv, double task_size, +XBT_PUBLIC(void) simcall_comm_send(smx_process_t sender, smx_rdv_t rdv, double task_size, double rate, void *src_buff, size_t src_buff_size, int (*match_fun)(void *, void *, smx_synchro_t), void (*copy_data_fun)(smx_synchro_t, void*, size_t), void *data, double timeout); -XBT_PUBLIC(smx_synchro_t) simcall_comm_isend(smx_process_t src, smx_rdv_t rdv, +XBT_PUBLIC(smx_synchro_t) simcall_comm_isend(smx_process_t sender, smx_rdv_t rdv, double task_size, double rate, void *src_buff, size_t src_buff_size, @@ -434,13 +423,13 @@ XBT_PUBLIC(smx_synchro_t) simcall_comm_isend(smx_process_t src, smx_rdv_t rdv, void (*copy_data_fun)(smx_synchro_t, void*, size_t), void *data, int detached); -XBT_PUBLIC(void) simcall_comm_recv(smx_rdv_t rdv, void *dst_buff, +XBT_PUBLIC(void) simcall_comm_recv(smx_process_t receiver, smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size, int (*match_fun)(void *, void *, smx_synchro_t), void (*copy_data_fun)(smx_synchro_t, void*, size_t), void *data, double timeout, double rate); -XBT_PUBLIC(smx_synchro_t) simcall_comm_irecv(smx_rdv_t rdv, void *dst_buff, +XBT_PUBLIC(smx_synchro_t) simcall_comm_irecv(smx_process_t receiver, smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size, int (*match_fun)(void *, void *, smx_synchro_t), void (*copy_data_fun)(smx_synchro_t, void*, size_t),