Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Enhance the communication filtering mechanism
[simgrid.git] / include / simix / simix.h
index cc84f0c..f34bcc3 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);
@@ -144,7 +145,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);
@@ -168,29 +169,29 @@ XBT_PUBLIC(xbt_dict_t) SIMIX_get_rdv_points(void);
 XBT_PUBLIC(void) simcall_comm_send(smx_rdv_t rdv, double task_size,
                                      double rate, void *src_buff,
                                      size_t src_buff_size,
-                                     int (*match_fun)(void *, void *),
+                                     int (*match_fun)(void *, void *, smx_action_t),
                                      void *data, double timeout);
 
 XBT_PUBLIC(smx_action_t) simcall_comm_isend(smx_rdv_t rdv, double task_size,
                                               double rate, void *src_buff,
                                               size_t src_buff_size,
-                                              int (*match_fun)(void *, void *),
+                                              int (*match_fun)(void *, void *, smx_action_t),
                                               void (*clean_fun)(void *),
                                               void *data, int detached);
 
 XBT_PUBLIC(void) simcall_comm_recv(smx_rdv_t rdv, void *dst_buff,
                                      size_t * dst_buff_size,
-                                     int (*match_fun)(void *, void *),
+                                     int (*match_fun)(void *, void *, smx_action_t),
                                      void *data, double timeout);
 
 XBT_PUBLIC(smx_action_t) simcall_comm_irecv(smx_rdv_t rdv, void *dst_buff,
                                               size_t * dst_buff_size,
-                                              int (*match_fun)(void *, void *),
+                                              int (*match_fun)(void *, void *, smx_action_t),
                                               void *data);
 
 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);
@@ -244,11 +245,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(size_t) simcall_file_read(void* ptr, size_t size, size_t nmemb, smx_file_t stream);
-XBT_PUBLIC(size_t) simcall_file_write(const void* ptr, size_t size, size_t nmemb, smx_file_t stream);
-XBT_PUBLIC(smx_file_t) simcall_file_open(const char* path, const char* mode);
-XBT_PUBLIC(int) simcall_file_close(smx_file_t fp);
-XBT_PUBLIC(int) simcall_file_stat(int fd, void* buf);
+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 */