File wait_for_graph.c
FileList > cubrid > src > transaction > wait_for_graph.c
Go to the source code of this file
#include "config.h"
#include <stddef.h>
#include <assert.h>
#include "error_manager.h"
#include "memory_alloc.h"
#include "wait_for_graph.h"
#include "critical_section.h"
#include "connection_error.h"
#include "memory_wrapper.hpp"
Classes
Public Types
Public Static Attributes
Public Functions
| Type |
Name |
| int |
wfg_alloc_nodes (THREAD_ENTRY * thread_p, const int num_trans)
|
| int |
wfg_alloc_tran_group (THREAD_ENTRY * thread_p)
|
| int |
wfg_detect_cycle (THREAD_ENTRY * thread_p, WFG_CYCLE_CASE * cycle_case, WFG_CYCLE ** list_cycles_p)
|
| int |
wfg_dump (THREAD_ENTRY * thread_p)
|
| int |
wfg_free_cycle (WFG_CYCLE * list_cycles_p)
|
| int |
wfg_free_nodes (THREAD_ENTRY * thread_p)
|
| int |
wfg_get_status (int * num_edges_p, int * num_waiters_p)
|
| int |
wfg_get_tran_entries (THREAD_ENTRY * thread_p, const int tran_index)
|
| int |
wfg_insert_holder_tran_group (THREAD_ENTRY * thread_p, const int tran_group_index, const int holder_tran_index)
|
| int |
wfg_insert_out_edges (THREAD_ENTRY * thread_p, const int waiter_tran_index, int num_holders, const int * holder_tran_indeces, int(*)(int tran_index, void *args) cycle_resolution_fn, void * args)
|
| int |
wfg_insert_waiter_tran_group (THREAD_ENTRY * thread_p, const int tran_group_index, const int waiter_tran_index, int(*)(int tran_index, void *args) cycle_resolution_fn, void * args)
|
| int |
wfg_is_tran_group_waiting (THREAD_ENTRY * thread_p, const int tran_index)
|
| int |
wfg_is_waiting (THREAD_ENTRY * thread_p, const int tran_index)
|
| int |
wfg_remove_holder_tran_group (THREAD_ENTRY * thread_p, const int tran_group_index, const int holder_tran_index)
|
| int |
wfg_remove_out_edges (THREAD_ENTRY * thread_p, const int waiter_tran_index, const int num_holders, const int * holder_tran_indices_p)
|
| int |
wfg_remove_waiter_tran_group (THREAD_ENTRY * thread_p, const int tran_group_index, const int waiter_tran_index)
|
Public Static Functions
| Type |
Name |
| int |
wfg_add_waiters_normal_wfg (int * smallest_onstack, int node_index)
|
| int |
wfg_add_waiters_of_tg (int * smallest_onstack, int holder_node, int tg_index)
|
| int |
wfg_allocate_edges (WFG_EDGE ** first_edge_p, WFG_EDGE ** last_edge_p, const int * holder_tran_indices, const int num_holders, const int waiter_tran_index)
|
| int |
wfg_detect_ordinary_cycle (THREAD_ENTRY * thread_p, WFG_CYCLE_CASE * cycle_case_p, WFG_CYCLE ** list_cycles_p, const int max_cycles_in_group, const int max_cycles)
|
| int |
wfg_detect_tran_group_cycle (THREAD_ENTRY * thread_p, WFG_CYCLE_CASE * cycle_case_p, WFG_CYCLE ** list_cycles)
|
| WFG_CYCLE * |
wfg_detect_tran_group_cycle_internal (WFG_CYCLE_CASE * cycle_case_p, WFG_TRANS_LIST * w_tran_list_p, bool add_waiter, int tg_index, int num_tran_groups_holders)
|
| int |
wfg_dump_given_cycles (FILE * out_fp, WFG_CYCLE * list_cycles_p)
|
| void |
wfg_dump_holder_waiter (FILE * out_fp, int node_index)
|
| void |
wfg_dump_holder_waiter_of_tran_group (FILE * out_fp, int group_index)
|
| int |
wfg_free_group_list (void)
|
| int |
wfg_get_all_waiting_and_add_waiter (bool * all_waiting, bool * add_waiter, int tg_index)
|
| int |
wfg_initialize_node (WFG_NODE * node_p)
|
| int |
wfg_internal_detect_cycle (THREAD_ENTRY * thread_p, WFG_CYCLE_CASE * cycle_case_p, WFG_CYCLE ** list_cycles_p, const int max_cycles_in_cycle_group, const int max_cycles)
|
| int |
wfg_link_edge_holders_waiter_list (WFG_EDGE * first_edge_p, WFG_EDGE * last_edge_p, const int waiter_tran_index)
|
| int |
wfg_pop_stack (WFG_STACK ** top_p, WFG_STACK ** bottom_p)
|
| int |
wfg_push_stack (WFG_STACK ** top_p, int node)
|
| int |
wfg_remove_waiter_list_of_holder_edge (WFG_NODE * node_p, WFG_EDGE ** holder_p)
|
Public Types Documentation
typedef WFG_EDGE
typedef struct wfg_edge WFG_EDGE;
typedef WFG_NODE
typedef struct wfg_node WFG_NODE;
typedef WFG_STACK
typedef struct wfg_stack WFG_STACK;
enum WFG_STACK_STATUS
enum WFG_STACK_STATUS {
WFG_NOT_VISITED,
WFG_ON_STACK,
WFG_OFF_STACK,
WFG_RE_ON_STACK,
WFG_ON_TG_CYCLE
};
typedef WFG_TRANS_LIST
typedef struct wfg_trans_list WFG_TRANS_LIST;
typedef WFG_TRAN_GROUP
typedef struct wfg_tran_group WFG_TRAN_GROUP;
Public Static Attributes Documentation
variable WFG_MAX_CYCLES_TO_REPORT
const int WFG_MAX_CYCLES_TO_REPORT;
variable WFG_PRUNE_CYCLES_IN_CYCLE_GROUP
const int WFG_PRUNE_CYCLES_IN_CYCLE_GROUP;
variable wfg_Nodes
variable wfg_Total_edges
variable wfg_Total_nodes
variable wfg_Total_tran_groups
int wfg_Total_tran_groups;
variable wfg_Total_waiters
variable wfg_Tran_group
WFG_TRAN_GROUP* wfg_Tran_group;
Public Functions Documentation
function wfg_alloc_nodes
int wfg_alloc_nodes (
THREAD_ENTRY * thread_p,
const int num_trans
)
function wfg_alloc_tran_group
int wfg_alloc_tran_group (
THREAD_ENTRY * thread_p
)
function wfg_detect_cycle
int wfg_detect_cycle (
THREAD_ENTRY * thread_p,
WFG_CYCLE_CASE * cycle_case,
WFG_CYCLE ** list_cycles_p
)
function wfg_dump
int wfg_dump (
THREAD_ENTRY * thread_p
)
function wfg_free_cycle
int wfg_free_cycle (
WFG_CYCLE * list_cycles_p
)
function wfg_free_nodes
int wfg_free_nodes (
THREAD_ENTRY * thread_p
)
function wfg_get_status
int wfg_get_status (
int * num_edges_p,
int * num_waiters_p
)
function wfg_get_tran_entries
int wfg_get_tran_entries (
THREAD_ENTRY * thread_p,
const int tran_index
)
function wfg_insert_holder_tran_group
int wfg_insert_holder_tran_group (
THREAD_ENTRY * thread_p,
const int tran_group_index,
const int holder_tran_index
)
function wfg_insert_out_edges
int wfg_insert_out_edges (
THREAD_ENTRY * thread_p,
const int waiter_tran_index,
int num_holders,
const int * holder_tran_indeces,
int (*)( int tran_index, void *args) cycle_resolution_fn,
void * args
)
function wfg_insert_waiter_tran_group
int wfg_insert_waiter_tran_group (
THREAD_ENTRY * thread_p,
const int tran_group_index,
const int waiter_tran_index,
int (*)( int tran_index, void *args) cycle_resolution_fn,
void * args
)
function wfg_is_tran_group_waiting
int wfg_is_tran_group_waiting (
THREAD_ENTRY * thread_p,
const int tran_index
)
function wfg_is_waiting
int wfg_is_waiting (
THREAD_ENTRY * thread_p,
const int tran_index
)
function wfg_remove_holder_tran_group
int wfg_remove_holder_tran_group (
THREAD_ENTRY * thread_p,
const int tran_group_index,
const int holder_tran_index
)
function wfg_remove_out_edges
int wfg_remove_out_edges (
THREAD_ENTRY * thread_p,
const int waiter_tran_index,
const int num_holders,
const int * holder_tran_indices_p
)
function wfg_remove_waiter_tran_group
int wfg_remove_waiter_tran_group (
THREAD_ENTRY * thread_p,
const int tran_group_index,
const int waiter_tran_index
)
Public Static Functions Documentation
function wfg_add_waiters_normal_wfg
static int wfg_add_waiters_normal_wfg (
int * smallest_onstack,
int node_index
)
function wfg_add_waiters_of_tg
static int wfg_add_waiters_of_tg (
int * smallest_onstack,
int holder_node,
int tg_index
)
function wfg_allocate_edges
static int wfg_allocate_edges (
WFG_EDGE ** first_edge_p,
WFG_EDGE ** last_edge_p,
const int * holder_tran_indices,
const int num_holders,
const int waiter_tran_index
)
function wfg_detect_ordinary_cycle
static int wfg_detect_ordinary_cycle (
THREAD_ENTRY * thread_p,
WFG_CYCLE_CASE * cycle_case_p,
WFG_CYCLE ** list_cycles_p,
const int max_cycles_in_group,
const int max_cycles
)
function wfg_detect_tran_group_cycle
static int wfg_detect_tran_group_cycle (
THREAD_ENTRY * thread_p,
WFG_CYCLE_CASE * cycle_case_p,
WFG_CYCLE ** list_cycles
)
function wfg_detect_tran_group_cycle_internal
static WFG_CYCLE * wfg_detect_tran_group_cycle_internal (
WFG_CYCLE_CASE * cycle_case_p,
WFG_TRANS_LIST * w_tran_list_p,
bool add_waiter,
int tg_index,
int num_tran_groups_holders
)
function wfg_dump_given_cycles
static int wfg_dump_given_cycles (
FILE * out_fp,
WFG_CYCLE * list_cycles_p
)
function wfg_dump_holder_waiter
static void wfg_dump_holder_waiter (
FILE * out_fp,
int node_index
)
function wfg_dump_holder_waiter_of_tran_group
static void wfg_dump_holder_waiter_of_tran_group (
FILE * out_fp,
int group_index
)
function wfg_free_group_list
static int wfg_free_group_list (
void
)
function wfg_get_all_waiting_and_add_waiter
static int wfg_get_all_waiting_and_add_waiter (
bool * all_waiting,
bool * add_waiter,
int tg_index
)
function wfg_initialize_node
static int wfg_initialize_node (
WFG_NODE * node_p
)
function wfg_internal_detect_cycle
static int wfg_internal_detect_cycle (
THREAD_ENTRY * thread_p,
WFG_CYCLE_CASE * cycle_case_p,
WFG_CYCLE ** list_cycles_p,
const int max_cycles_in_cycle_group,
const int max_cycles
)
function wfg_link_edge_holders_waiter_list
static int wfg_link_edge_holders_waiter_list (
WFG_EDGE * first_edge_p,
WFG_EDGE * last_edge_p,
const int waiter_tran_index
)
function wfg_pop_stack
static int wfg_pop_stack (
WFG_STACK ** top_p,
WFG_STACK ** bottom_p
)
function wfg_push_stack
static int wfg_push_stack (
WFG_STACK ** top_p,
int node
)
function wfg_remove_waiter_list_of_holder_edge
static int wfg_remove_waiter_list_of_holder_edge (
WFG_NODE * node_p,
WFG_EDGE ** holder_p
)
The documentation for this class was generated from the following file cubrid/src/transaction/wait_for_graph.c