trace: Use pipe_static_mutex.

This commit is contained in:
José Fonseca 2011-03-06 09:11:13 +00:00
parent db6d0d9ebf
commit e640eec9ba
3 changed files with 1 additions and 22 deletions

View file

@ -60,10 +60,9 @@
static struct os_stream *stream = NULL;
static unsigned refcount = 0;
static pipe_mutex call_mutex;
pipe_static_mutex(call_mutex);
static long unsigned call_no = 0;
static boolean dumping = FALSE;
static boolean initialized = FALSE;
static INLINE void
@ -225,26 +224,13 @@ trace_dump_trace_close(void)
stream = NULL;
refcount = 0;
call_no = 0;
pipe_mutex_destroy(call_mutex);
}
}
void trace_dump_init()
{
if (initialized)
return;
pipe_mutex_init(call_mutex);
dumping = FALSE;
initialized = TRUE;
}
boolean trace_dump_trace_begin()
{
const char *filename;
assert(initialized);
filename = debug_get_option("GALLIUM_TRACE", NULL);
if(!filename)
return FALSE;

View file

@ -42,11 +42,6 @@ struct pipe_surface;
struct pipe_transfer;
struct pipe_box;
/*
* Call before use.
*/
void trace_dump_init(void);
/*
* Low level dumping controls.
*

View file

@ -472,8 +472,6 @@ trace_enabled(void)
return trace;
firstrun = FALSE;
trace_dump_init();
if(trace_dump_trace_begin()) {
trace_dumping_start();
trace = TRUE;