static void vi_cu_board_refresh(struct vi_cu_board_t *board) { struct hash_table_t *work_group_table; struct vi_evg_work_group_t *work_group; char *work_group_name; long long cycle; /* Go to cycle */ cycle = vi_cycle_bar_get_cycle(); vi_state_go_to_cycle(cycle); /* Empty work-group list */ while (vi_list_count(board->work_group_list)) free(vi_list_remove_at(board->work_group_list, 0)); /* Refresh work-group list */ work_group_table = board->compute_unit->work_group_table; HASH_TABLE_FOR_EACH(work_group_table, work_group_name, work_group) { /* Duplicate name */ work_group_name = strdup(work_group_name); if (!work_group_name) fatal("%s: out of memory", __FUNCTION__); /* Add to list */ vi_list_add(board->work_group_list, work_group_name); }
static void vi_x86_core_board_refresh(struct vi_x86_core_board_t *board) { struct hash_table_t *context_table; struct vi_x86_context_t *context; char *context_name; long long cycle; /* Go to cycle */ cycle = vi_cycle_bar_get_cycle(); vi_state_go_to_cycle(cycle); /* Empty context list */ while (vi_list_count(board->context_list)) free(vi_list_remove_at(board->context_list, 0)); /* Refresh context list */ context_table = board->core->context_table; HASH_TABLE_FOR_EACH(context_table, context_name, context) { /* Duplicate name */ context_name = strdup(context_name); if (!context_name) fatal("%s: out of memory", __FUNCTION__); /* Add to list */ vi_list_add(board->context_list, context_name); }
static void vi_x86_core_board_free(struct vi_x86_core_board_t *board) { /* Free context list */ while (vi_list_count(board->context_list)) free(vi_list_remove_at(board->context_list, 0)); vi_list_free(board->context_list); /* Destroy time diagram */ if (board->time_dia_window) gtk_widget_destroy( vi_x86_time_dia_window_get_widget(board->time_dia_window)); /* Free */ free(board); }
static void vi_cu_board_free(struct vi_cu_board_t *board) { /* Free work-group list */ while (vi_list_count(board->work_group_list)) free(vi_list_remove_at(board->work_group_list, 0)); vi_list_free(board->work_group_list); /* Destroy time diagram */ if (board->time_dia_window) gtk_widget_destroy(vi_evg_time_dia_window_get_widget(board->time_dia_window)); /* Free */ free(board); }