int uninstall_callbacks(void) { int rv = 0; rv = chpl_task_uninstall_callback(chpl_task_cb_event_kind_create, cb_task_create); rv += chpl_task_uninstall_callback(chpl_task_cb_event_kind_begin, cb_task_begin); rv += chpl_task_uninstall_callback(chpl_task_cb_event_kind_end, cb_task_end); return rv; }
int uninstall_callbacks (void) { int rv = 0; rv = chpl_task_uninstall_callback(chpl_task_cb_event_kind_create, cb_task_create); rv += chpl_task_uninstall_callback(chpl_task_cb_event_kind_begin, cb_task_begin); rv += chpl_task_uninstall_callback(chpl_task_cb_event_kind_end, cb_task_end); rv += chpl_comm_uninstall_callback(chpl_comm_cb_event_kind_put_nb, cb_comm_put_nb); rv += chpl_comm_uninstall_callback(chpl_comm_cb_event_kind_get_nb, cb_comm_get_nb); rv += chpl_comm_uninstall_callback(chpl_comm_cb_event_kind_put, cb_comm_put); rv += chpl_comm_uninstall_callback(chpl_comm_cb_event_kind_get, cb_comm_get); rv += chpl_comm_uninstall_callback(chpl_comm_cb_event_kind_put_strd, cb_comm_put_strd); rv += chpl_comm_uninstall_callback(chpl_comm_cb_event_kind_get_strd, cb_comm_get_strd); rv += chpl_comm_uninstall_callback(chpl_comm_cb_event_kind_executeOn, cb_comm_executeOn); rv += chpl_comm_uninstall_callback(chpl_comm_cb_event_kind_executeOn_nb, cb_comm_executeOn_nb); rv += chpl_comm_uninstall_callback(chpl_comm_cb_event_kind_executeOn_fast, cb_comm_executeOn_fast); return rv; }
int install_callbacks(void) { if (chpl_task_install_callback(chpl_task_cb_event_kind_create, chpl_task_cb_info_kind_full, cb_task_create) != 0) return 1; if (chpl_task_install_callback(chpl_task_cb_event_kind_begin, chpl_task_cb_info_kind_full, cb_task_begin) != 0) { (void) chpl_task_uninstall_callback(chpl_task_cb_event_kind_create, cb_task_create); return 1; } if (chpl_task_install_callback(chpl_task_cb_event_kind_end, chpl_task_cb_info_kind_id_only, cb_task_end) != 0) { (void) chpl_task_uninstall_callback(chpl_task_cb_event_kind_create, cb_task_create); (void) chpl_task_uninstall_callback(chpl_task_cb_event_kind_begin, cb_task_begin); return 1; } return 0; }