mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 10:08:08 +02:00
util: Make debug_dump_flags thread safe
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33491>
This commit is contained in:
parent
30a3d567c8
commit
0886eda4f1
1 changed files with 3 additions and 2 deletions
|
|
@ -30,6 +30,7 @@
|
|||
#include "util/u_debug.h"
|
||||
#include "util/u_string.h"
|
||||
#include "util/u_math.h"
|
||||
#include "c11/threads.h"
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -378,8 +379,8 @@ debug_dump_enum(const struct debug_named_value *names,
|
|||
const char *
|
||||
debug_dump_flags(const struct debug_named_value *names, uint64_t value)
|
||||
{
|
||||
static char output[4096];
|
||||
static char rest[256];
|
||||
static thread_local char output[4096];
|
||||
static thread_local char rest[256];
|
||||
int first = 1;
|
||||
|
||||
output[0] = '\0';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue