HPCToolkit
cct_backtrace_finalize.c
Go to the documentation of this file.
1 //******************************************************************************
2 // local includes
3 //******************************************************************************
4 
6 
7 
8 
9 //******************************************************************************
10 // global variables
11 //******************************************************************************
12 
14 
16 
17 
18 
19 //******************************************************************************
20 // interface operations
21 //******************************************************************************
22 
23 void
26 )
27 {
28  // enqueue finalizer on list
29  e->next = finalizers;
30  finalizers = e;
31 }
32 
33 
34 void
37 )
38 {
39  cursor_finalize = fn;
40 }
41 
42 
43 void
45  backtrace_info_t *bt,
46  int isSync
47 )
48 {
50  while (e) {
51  e->fn(bt, isSync);
52  e = e->next;
53  }
54 }
55 
56 
57 cct_node_t *
59  cct_bundle_t *cct,
60  backtrace_info_t *bt,
61  cct_node_t *cursor
62 )
63 {
64  if (cursor_finalize) return cursor_finalize(cct, bt, cursor);
65  else return cursor;
66 }
67 
static cct_backtrace_finalize_entry_t * finalizers
static cct_cursor_finalize_fn cursor_finalize
cct_node_t *(* cct_cursor_finalize_fn)(cct_bundle_t *cct, backtrace_info_t *bt, cct_node_t *cursor)
void cct_backtrace_finalize_register(cct_backtrace_finalize_entry_t *e)
void cct_cursor_finalize_register(cct_cursor_finalize_fn fn)
cct_node_t * cct_cursor_finalize(cct_bundle_t *cct, backtrace_info_t *bt, cct_node_t *cursor)
cct_backtrace_finalize_fn fn
Definition: cct.c:96
void cct_backtrace_finalize(backtrace_info_t *bt, int isSync)
struct cct_backtrace_finalize_entry_s * next