Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
First steps for making a tutorial on How to create a new API in Simgrid
[simgrid.git] / src / simix / smx_user.c
index 2ad612d..7f48359 100644 (file)
@@ -1651,6 +1651,20 @@ xbt_dict_t simcall_file_ls(const char* mount, const char* path)
   return simcall->file_ls.result;
 }
 
+/* ****************************************************************************************** */
+/* TUTORIAL: New API                                                                          */
+/* All functions for simcall                                                                  */
+/* ****************************************************************************************** */
+int simcall_new_api_fct(const char* param1, double param2){
+  smx_simcall_t simcall = SIMIX_simcall_mine();
+  simcall->call = SIMCALL_NEW_API_INIT;
+  simcall->new_api.param1 = param1;
+  simcall->new_api.param2 = param2;
+
+  SIMIX_simcall_push(simcall->issuer);
+  return simcall->new_api.result;
+}
+
 /* ************************************************************************** */
 
 /** @brief returns a printable string representing a simcall */