*/
typedef smx_process_t (*smx_creation_func_t) (
/* name */ const char*,
- /* code */ xbt_main_func_t,
+ std::function<void()> code,
/* userdata */ void*,
/* hostname */ const char*,
/* kill_time */ double,
- simgrid::simix::args args,
/* props */ xbt_dict_t,
/* auto_restart */ int,
/* parent_process */ smx_process_t);
XBT_PUBLIC(void) SIMIX_function_register_process_create(smx_creation_func_t function);
XBT_PUBLIC(smx_process_t) simcall_process_create(const char *name,
- xbt_main_func_t code,
+ std::function<void()> code,
void *data,
const char *hostname,
double kill_time,
- simgrid::simix::args args,
xbt_dict_t properties,
int auto_restart);
+XBT_PUBLIC(smx_timer_t) SIMIX_timer_set(double date, std::function<void()> callback);
+
+template<class R, class T> inline
+XBT_PUBLIC(smx_timer_t) SIMIX_timer_set(double date, R(*callback)(T*), T* arg)
+{
+ return SIMIX_timer_set(date, [=](){ callback(arg); });
+}
+
#endif