Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright notices
[simgrid.git] / include / simgrid / simix.h
index b85a67d..9380343 100644 (file)
@@ -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
@@ -79,7 +79,7 @@ typedef struct s_smx_synchro *smx_synchro_t; /* FIXME: replace by specialized sy
 /** @brief Process datatype
     @ingroup simix_process_management
 
-    A processt may be defined as a <em>code</em>, with some <em>private
+    A process may be defined as a <em>code</em>, with some <em>private
     data</em>, executing in a <em>location</em>.
     \see m_process_management
   @{ */
@@ -102,7 +102,7 @@ typedef enum {
  * int argc, char **argv: parameters passed to code
  * xbt_dict_t pros: properties
  */
-typedef void (*smx_creation_func_t) ( /* process */ smx_process_t*,
+typedef smx_process_t (*smx_creation_func_t) (
                                       /* name */ const char*,
                                       /* code */ xbt_main_func_t,
                                       /* userdata */ void*,
@@ -259,8 +259,6 @@ XBT_PUBLIC(void) SIMIX_process_set_function(const char* process_host,
                                             double process_kill_time);
 
 /*********************************** Host *************************************/
-//XBT_PUBLIC(xbt_dict_t) SIMIX_host_get_dict(u_smx_scalar_t *args);
-XBT_PUBLIC(sg_host_t) SIMIX_host_get_by_name(const char *name);
 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 */
@@ -300,7 +298,6 @@ 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(sg_host_t) simcall_host_get_by_name(const char *name);
 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);
@@ -324,28 +321,28 @@ 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, ws_params_t param);
-XBT_PUBLIC(void) simcall_host_set_params(sg_host_t vm, ws_params_t param);
+XBT_PUBLIC(void) simcall_host_get_params(sg_host_t vm, vm_params_t param);
+XBT_PUBLIC(void) simcall_host_set_params(sg_host_t vm, vm_params_t param);
 
 /******************************* VM simcalls ********************************/
 // Create the vm_workstation at the SURF level
@@ -366,8 +363,7 @@ XBT_PUBLIC(void) simcall_vm_shutdown(sg_host_t vm);
 
 /**************************** Process simcalls ********************************/
 /* Constructor and Destructor */
-XBT_PUBLIC(void) simcall_process_create(smx_process_t *process,
-                                          const char *name,
+XBT_PUBLIC(smx_process_t) simcall_process_create(const char *name,
                                           xbt_main_func_t code,
                                           void *data,
                                           const char *hostname,
@@ -399,6 +395,7 @@ XBT_PUBLIC(int) simcall_process_get_PPID(smx_process_t process);
 XBT_PUBLIC(int) simcall_process_is_suspended(smx_process_t process);
 XBT_PUBLIC(xbt_dict_t) simcall_process_get_properties(smx_process_t host);
 XBT_PUBLIC(void) simcall_process_set_kill_time(smx_process_t process, double kill_time);
+XBT_PUBLIC(double) simcall_process_get_kill_time(smx_process_t process);
 XBT_PUBLIC(void) simcall_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void *data);
 XBT_PUBLIC(void) simcall_process_auto_restart_set(smx_process_t process, int auto_restart);
 XBT_PUBLIC(smx_process_t) simcall_process_restart(smx_process_t process);