diff options
author | José Fonseca <[email protected]> | 2011-11-09 07:02:27 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2011-11-29 17:34:30 +0000 |
commit | 57f8e26ca87a2846f192682c84eccbf8b4500bfc (patch) | |
tree | bc0ff646a7a9dba4006d85610f86118bdf58bb3d /src/gallium/drivers/trace | |
parent | 23a8a7fe8c799ed9040a03ef8e9e058686c00206 (diff) |
gallium/auxiliary: Remove os_stream.
XP kernel mode was the only subsystem lacking stdio FILES.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/trace')
-rw-r--r-- | src/gallium/drivers/trace/tr_dump.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/gallium/drivers/trace/tr_dump.c b/src/gallium/drivers/trace/tr_dump.c index 8a4ec20fb84..ecc5bbcc2cf 100644 --- a/src/gallium/drivers/trace/tr_dump.c +++ b/src/gallium/drivers/trace/tr_dump.c @@ -40,13 +40,11 @@ #include "pipe/p_config.h" -#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) +#include <stdio.h> #include <stdlib.h> -#endif #include "pipe/p_compiler.h" #include "os/os_thread.h" -#include "os/os_stream.h" #include "util/u_debug.h" #include "util/u_memory.h" #include "util/u_string.h" @@ -58,7 +56,7 @@ #include "tr_texture.h" -static struct os_stream *stream = NULL; +static FILE *stream = NULL; static unsigned refcount = 0; pipe_static_mutex(call_mutex); static long unsigned call_no = 0; @@ -68,8 +66,9 @@ static boolean dumping = FALSE; static INLINE void trace_dump_write(const char *buf, size_t size) { - if(stream) - os_stream_write(stream, buf, size); + if (stream) { + fwrite(buf, size, 1, stream); + } } @@ -220,7 +219,7 @@ trace_dump_trace_close(void) { if(stream) { trace_dump_writes("</trace>\n"); - os_stream_close(stream); + fclose(stream); stream = NULL; refcount = 0; call_no = 0; @@ -237,7 +236,7 @@ boolean trace_dump_trace_begin() if(!stream) { - stream = os_file_stream_create(filename); + stream = fopen(filename, "wt"); if(!stream) return FALSE; @@ -354,7 +353,7 @@ void trace_dump_call_end_locked(void) trace_dump_indent(1); trace_dump_tag_end("call"); trace_dump_newline(); - os_stream_flush(stream); + fflush(stream); } void trace_dump_call_begin(const char *klass, const char *method) |