Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Workaround problem with excess precision on i387 FPU.
[simgrid.git] / include / simix / simix.h
index 3e5d219..59522ff 100644 (file)
@@ -10,6 +10,7 @@
 #include "xbt/misc.h"
 #include "xbt/fifo.h"
 #include "xbt/dict.h"
+#include "xbt/file_stat.h"
 #include "xbt/function_types.h"
 #include "simix/datatypes.h"
 #include "simix/context.h"
@@ -28,7 +29,7 @@ XBT_PUBLIC(void) SIMIX_function_register_process_kill(void_pfn_smxprocess_t func
 
 /* Simulation execution */
 XBT_PUBLIC(void) SIMIX_run(void);    
-XBT_INLINE XBT_PUBLIC(double) SIMIX_get_clock(void);
+XBT_PUBLIC(double) SIMIX_get_clock(void);
 
 /* Timer functions FIXME: should these be public? */
 XBT_PUBLIC(void) SIMIX_timer_set(double date, void *function, void *arg);
@@ -62,7 +63,7 @@ XBT_PUBLIC(void*) SIMIX_host_self_get_data(void);
 
 /********************************* Process ************************************/
 XBT_PUBLIC(int) SIMIX_process_count(void);
-XBT_INLINE XBT_PUBLIC(smx_process_t) SIMIX_process_self(void);
+XBT_PUBLIC(smx_process_t) SIMIX_process_self(void);
 XBT_PUBLIC(const char*) SIMIX_process_self_get_name(void);
 XBT_PUBLIC(void) SIMIX_process_self_set_data(smx_process_t self, void *data);
 XBT_PUBLIC(void*) SIMIX_process_self_get_data(smx_process_t self);
@@ -91,7 +92,7 @@ XBT_PUBLIC(void) SIMIX_comm_finish(smx_action_t action);
 /******************************* Host simcalls ********************************/
 /* TODO use handlers and keep smx_host_t hidden from higher levels */
 XBT_PUBLIC(xbt_dict_t) simcall_host_get_dict(void);
-XBT_INLINE XBT_PUBLIC(smx_host_t) simcall_host_get_by_name(const char *name);
+XBT_PUBLIC(smx_host_t) simcall_host_get_by_name(const char *name);
 XBT_PUBLIC(const char *) simcall_host_get_name(smx_host_t host);
 XBT_PUBLIC(xbt_dict_t) simcall_host_get_properties(smx_host_t host);
 XBT_PUBLIC(double) simcall_host_get_speed(smx_host_t host);
@@ -127,6 +128,7 @@ XBT_PUBLIC(void) simcall_process_create(smx_process_t *process,
                                           xbt_main_func_t code,
                                           void *data,
                                           const char *hostname,
+                                          double kill_time,
                                           int argc, char **argv,
                                           xbt_dict_t properties);
 
@@ -144,7 +146,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_INLINE XBT_PUBLIC(smx_host_t) simcall_process_get_host(smx_process_t process);
+XBT_PUBLIC(smx_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_is_suspended(smx_process_t process);
 XBT_PUBLIC(xbt_dict_t) simcall_process_get_properties(smx_process_t host);
@@ -154,12 +156,15 @@ XBT_PUBLIC(e_smx_state_t) simcall_process_sleep(double duration);
 
 /************************** Comunication simcalls *****************************/
 /***** Rendez-vous points *****/
+
 XBT_PUBLIC(smx_rdv_t) simcall_rdv_create(const char *name);
 XBT_PUBLIC(void) simcall_rdv_destroy(smx_rdv_t rvp);
 XBT_PUBLIC(smx_rdv_t) simcall_rdv_get_by_name(const char *name);
 XBT_PUBLIC(int) simcall_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host);
 XBT_PUBLIC(smx_action_t) simcall_rdv_get_head(smx_rdv_t rdv);
 
+XBT_PUBLIC(xbt_dict_t) SIMIX_get_rdv_points(void);
+
 /***** Communication simcalls *****/
 
 XBT_PUBLIC(void) simcall_comm_send(smx_rdv_t rdv, double task_size,
@@ -187,7 +192,7 @@ XBT_PUBLIC(smx_action_t) simcall_comm_irecv(smx_rdv_t rdv, void *dst_buff,
 
 XBT_PUBLIC(void) simcall_comm_destroy(smx_action_t comm);
 
-XBT_INLINE XBT_PUBLIC(void) simcall_comm_cancel(smx_action_t comm);
+XBT_PUBLIC(void) simcall_comm_cancel(smx_action_t comm);
 
 /* FIXME: waitany is going to be a vararg function, and should take a timeout */
 XBT_PUBLIC(unsigned int) simcall_comm_waitany(xbt_dynar_t comms);
@@ -241,7 +246,11 @@ XBT_PUBLIC(void) simcall_sem_acquire_timeout(smx_sem_t sem,
 XBT_PUBLIC(unsigned int) simcall_sem_acquire_any(xbt_dynar_t sems);
 XBT_PUBLIC(int) simcall_sem_get_capacity(smx_sem_t sem);
 
-XBT_PUBLIC(void) simcall_file_read(char* name);
+XBT_PUBLIC(size_t) simcall_file_read(const char* storage, void* ptr, size_t size, size_t nmemb, smx_file_t stream);
+XBT_PUBLIC(size_t) simcall_file_write(const char* storage, const void* ptr, size_t size, size_t nmemb, smx_file_t stream);
+XBT_PUBLIC(smx_file_t) simcall_file_open(const char* storage, const char* path, const char* mode);
+XBT_PUBLIC(int) simcall_file_close(const char* storage, smx_file_t fp);
+XBT_PUBLIC(int) simcall_file_stat(const char* storage, smx_file_t fd, s_file_stat_t *buf);
 
 SG_END_DECL()
 #endif                          /* _SIMIX_SIMIX_H */