1 #include "coregl_internal.h"
7 int trace_api_flag = 0;
8 int trace_api_all_flag = 0;
9 int trace_api_frame_flag = 0;
10 int trace_ctx_flag = 0;
11 int trace_ctx_force_flag = 0;
12 int trace_mem_flag = 0;
13 int trace_mem_all_flag = 0;
14 int trace_state_flag = 0;
15 int trace_surface_flag = 0;
16 int trace_surface_all_flag = 0;
17 int trace_surface_sequence_sort_flag = 0;
18 int trace_surface_filter_period_begin = 0;
19 int trace_surface_filter_period_end = 0;
20 int trace_surface_filter_type = 0;
21 int trace_surface_filter_handle = 0;
22 int trace_surface_filter_size_w = 0;
23 int trace_surface_filter_size_h = 0;
24 int trace_surface_print_only_flag = 0;
26 General_Trace_List *thread_trace_list = NULL;
27 Mutex general_trace_lists_access_mutex = MUTEX_INITIALIZER;
31 add_to_general_trace_list(General_Trace_List **gtl, void *value)
34 General_Trace_List *newitm = NULL;
36 AST(mutex_lock(&general_trace_lists_access_mutex) == 1);
38 newitm = (General_Trace_List *)calloc(1, sizeof(General_Trace_List));
39 /* Prevent CID : 395957 */
40 if (newitm == NULL) goto finish;
41 newitm->value = value;
48 AST(mutex_unlock(&general_trace_lists_access_mutex) == 1);
53 remove_from_general_trace_list(General_Trace_List **gtl, void *value)
56 General_Trace_List *current = NULL;
57 General_Trace_List *priv = NULL;
59 AST(mutex_lock(&general_trace_lists_access_mutex) == 1);
63 while (current != NULL)
65 if (current->value == value)
70 priv->next = current->next;
77 current = current->next;
82 AST(mutex_unlock(&general_trace_lists_access_mutex) == 1);