25 #ifndef _WAIT_FOR_GRAPH_H_ 26 #define _WAIT_FOR_GRAPH_H_ 30 #if defined(ENABLE_UNUSED_FUNCTION) 42 typedef struct wfg_waiter WFG_WAITER;
46 int (*cycle_fun) (
int tran_index,
void *args);
50 typedef struct wfg_listcycle WFG_CYCLE;
55 struct wfg_listcycle *next;
58 extern int wfg_alloc_nodes (
THREAD_ENTRY * thread_p,
const int num_trans);
60 extern int wfg_insert_out_edges (
THREAD_ENTRY * thread_p,
const int wtran_index,
int num_holders,
61 const int *htran_indices,
int (*cycle_resolution_fn) (
int tran_index,
void *args),
63 extern int wfg_remove_out_edges (
THREAD_ENTRY * thread_p,
const int waiter_tran_index,
const int num_holders,
64 const int *htran_indices_p);
65 extern int wfg_get_status (
int *num_edges_p,
int *num_waiters_p);
66 extern int wfg_detect_cycle (
THREAD_ENTRY * thread_p, WFG_CYCLE_CASE * cycle_case, WFG_CYCLE ** list_cycles_p);
67 extern int wfg_free_cycle (WFG_CYCLE * list_cycles_p);
68 extern int wfg_is_waiting (
THREAD_ENTRY * thread_p,
const int tran_index);
69 extern int wfg_get_tran_entries (
THREAD_ENTRY * thread_p,
const int tran_index);
72 extern int wfg_alloc_tran_group (
THREAD_ENTRY * thread_p);
73 extern int wfg_insert_holder_tran_group (
THREAD_ENTRY * thread_p,
const int tran_group_index,
74 const int holder_tran_index);
75 extern int wfg_remove_holder_tran_group (
THREAD_ENTRY * thread_p,
const int tran_group_index,
76 const int holder_tran_index);
77 extern int wfg_insert_waiter_tran_group (
THREAD_ENTRY * thread_p,
const int tran_group_index,
78 const int waiter_tran_index,
int (*cycle_resolution_fn) (
int tran_index,
81 extern int wfg_remove_waiter_tran_group (
THREAD_ENTRY * thread_p,
const int tran_group_index,
82 const int waiter_tran_index);
83 extern int wfg_is_tran_group_waiting (
THREAD_ENTRY * thread_p,
const int tran_index);