-/** \ingroup msg_actions
- * \brief Registers a function to handle a kind of action
- *
- * Registers a function to handle a kind of action
- * This table is then used by #MSG_action_trace_run
- *
- * The argument of the function is the line describing the action, splitted on spaces with xbt_str_split_quoted()
- *
- * \param name the reference name of the action.
- * \param code the function; prototype given by the type: void...(xbt_dynar_t action)
- */
-void MSG_action_register(const char*action_name, msg_action_fun function) {
- xbt_dict_set(action_funs,action_name,function,NULL);
-}
-/** \ingroup msg_actions
- * \brief Unregisters a function, which handled a kind of action
- *
- * \param name the reference name of the action.
- */
-void MSG_action_unregister(const char*action_name) {
- xbt_dict_remove(action_funs,action_name);
-}
-
-static int MSG_action_runner(int argc, char* argv[]) {
- xbt_dynar_t evt;
- unsigned int cursor;
-
- xbt_dynar_foreach(action_list,cursor,evt) {
- if (!strcmp(xbt_dynar_get_as(evt,0,char*),argv[0])) {
- msg_action_fun function = xbt_dict_get(action_funs,xbt_dynar_get_as(evt,1,char*));
- (*function)(evt);
- }
- }