util/mesa/wide: Rename _SIMPLE_MTX_INITIALIZER_NP to SIMPLE_MTX_INITIALIZER
authorYonggang Luo <luoyonggang@gmail.com>
Fri, 2 Sep 2022 16:13:15 +0000 (00:13 +0800)
committerMarge Bot <emma+marge@anholt.net>
Fri, 14 Oct 2022 03:27:41 +0000 (03:27 +0000)
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18393>

16 files changed:
src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
src/egl/main/eglglobals.c
src/etnaviv/drm/etnaviv_bo.c
src/freedreno/drm/freedreno_bo.c
src/gallium/drivers/crocus/crocus_bufmgr.c
src/gallium/drivers/iris/iris_bufmgr.c
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
src/intel/nullhw-layer/intel_nullhw.c
src/mesa/main/bufferobj.c
src/mesa/main/fbobject.c
src/mesa/main/version.c
src/panfrost/lib/genxml/decode_common.c
src/util/perf/u_trace.c
src/util/simple_mtx.h
src/virtio/vulkan/vn_cs.c
src/vulkan/overlay-layer/overlay.cpp

index 54d9cab..5b5f240 100644 (file)
@@ -138,7 +138,7 @@ radv_amdgpu_winsys_get_chip_name(struct radeon_winsys *rws)
    return amdgpu_get_marketing_name(dev);
 }
 
-static simple_mtx_t winsys_creation_mutex = _SIMPLE_MTX_INITIALIZER_NP;
+static simple_mtx_t winsys_creation_mutex = SIMPLE_MTX_INITIALIZER;
 static struct hash_table *winsyses = NULL;
 
 static void
index 93013ea..6ae161f 100644 (file)
@@ -47,7 +47,7 @@
 #endif
 
 
-static simple_mtx_t _eglGlobalMutex = _SIMPLE_MTX_INITIALIZER_NP;
+static simple_mtx_t _eglGlobalMutex = SIMPLE_MTX_INITIALIZER;
 
 struct _egl_global _eglGlobal =
 {
index 8384b98..d790823 100644 (file)
@@ -30,7 +30,7 @@
 #include "etnaviv_priv.h"
 #include "etnaviv_drmif.h"
 
-simple_mtx_t etna_device_lock = _SIMPLE_MTX_INITIALIZER_NP;
+simple_mtx_t etna_device_lock = SIMPLE_MTX_INITIALIZER;
 
 /* set buffer name, and add to table, call w/ etna_drm_table_lock held: */
 static void set_name(struct etna_bo *bo, uint32_t name)
index cbc3100..fa63709 100644 (file)
@@ -29,7 +29,7 @@
 #include "freedreno_drmif.h"
 #include "freedreno_priv.h"
 
-simple_mtx_t table_lock = _SIMPLE_MTX_INITIALIZER_NP;
+simple_mtx_t table_lock = SIMPLE_MTX_INITIALIZER;
 void bo_del(struct fd_bo *bo);
 
 /* set buffer name, and add to table, call w/ table_lock held: */
index 060ad75..eddcadb 100644 (file)
@@ -164,7 +164,7 @@ struct crocus_bufmgr {
    bool bo_reuse:1;
 };
 
-static simple_mtx_t global_bufmgr_list_mutex = _SIMPLE_MTX_INITIALIZER_NP;
+static simple_mtx_t global_bufmgr_list_mutex = SIMPLE_MTX_INITIALIZER;
 static struct list_head global_bufmgr_list = {
    .next = &global_bufmgr_list,
    .prev = &global_bufmgr_list,
index 9c9aefa..a70dbaa 100644 (file)
@@ -247,7 +247,7 @@ struct iris_bufmgr {
    struct iris_border_color_pool border_color_pool;
 };
 
-static simple_mtx_t global_bufmgr_list_mutex = _SIMPLE_MTX_INITIALIZER_NP;
+static simple_mtx_t global_bufmgr_list_mutex = SIMPLE_MTX_INITIALIZER;
 static struct list_head global_bufmgr_list = {
    .next = &global_bufmgr_list,
    .prev = &global_bufmgr_list,
index 318197b..05ff784 100644 (file)
@@ -44,7 +44,7 @@
 #include "sid.h"
 
 static struct hash_table *dev_tab = NULL;
-static simple_mtx_t dev_tab_mutex = _SIMPLE_MTX_INITIALIZER_NP;
+static simple_mtx_t dev_tab_mutex = SIMPLE_MTX_INITIALIZER;
 
 #if DEBUG
 DEBUG_GET_ONCE_BOOL_OPTION(all_bos, "RADEON_ALL_BOS", false)
index 308b289..9320d0b 100644 (file)
@@ -54,7 +54,7 @@ struct device_data {
 };
 
 static struct hash_table_u64 *vk_object_to_data = NULL;
-static simple_mtx_t vk_object_to_data_mutex = _SIMPLE_MTX_INITIALIZER_NP;
+static simple_mtx_t vk_object_to_data_mutex = SIMPLE_MTX_INITIALIZER;
 
 static inline void ensure_vk_object_map(void)
 {
index 0c267dd..38129d4 100644 (file)
@@ -650,7 +650,7 @@ buffer_usage_warning(struct gl_context *ctx, GLuint *id, const char *fmt, ...)
  * glBindBuffer() so that glIsBuffer() can work correctly.
  */
 static struct gl_buffer_object DummyBufferObject = {
-   .MinMaxCacheMutex = _SIMPLE_MTX_INITIALIZER_NP,
+   .MinMaxCacheMutex = SIMPLE_MTX_INITIALIZER,
    .RefCount = 1000*1000*1000,  /* never delete */
 };
 
index 9d90bea..be1d619 100644 (file)
@@ -86,7 +86,7 @@ delete_dummy_framebuffer(struct gl_framebuffer *fb)
  * with the real frame/renderbuffer.
  */
 static struct gl_framebuffer DummyFramebuffer = {
-   .Mutex = _SIMPLE_MTX_INITIALIZER_NP,
+   .Mutex = SIMPLE_MTX_INITIALIZER,
    .Delete = delete_dummy_framebuffer,
 };
 static struct gl_renderbuffer DummyRenderbuffer = {
@@ -96,7 +96,7 @@ static struct gl_renderbuffer DummyRenderbuffer = {
 /* We bind this framebuffer when applications pass a NULL
  * drawable/surface in make current. */
 static struct gl_framebuffer IncompleteFramebuffer = {
-   .Mutex = _SIMPLE_MTX_INITIALIZER_NP,
+   .Mutex = SIMPLE_MTX_INITIALIZER,
    .Delete = delete_dummy_framebuffer,
 };
 
index 7422065..8b72b08 100644 (file)
@@ -36,7 +36,7 @@
 
 #include "state_tracker/st_context.h"
 
-static simple_mtx_t override_lock = _SIMPLE_MTX_INITIALIZER_NP;
+static simple_mtx_t override_lock = SIMPLE_MTX_INITIALIZER;
 
 /**
  * Scans 'string' to see if it ends with 'ending'.
index 18f3ed1..ecc0238 100644 (file)
@@ -44,7 +44,7 @@ static struct rb_tree mmap_tree;
 
 static struct util_dynarray ro_mappings;
 
-static simple_mtx_t pandecode_lock = _SIMPLE_MTX_INITIALIZER_NP;
+static simple_mtx_t pandecode_lock = SIMPLE_MTX_INITIALIZER;
 
 #define to_mapped_memory(x) \
        rb_node_data(struct pandecode_mapped_memory, x, node)
index a73cd13..11e10b2 100644 (file)
@@ -59,7 +59,7 @@ int ut_perfetto_enabled;
  */
 static struct list_head ctx_list = { &ctx_list, &ctx_list };
 
-static simple_mtx_t ctx_list_mutex = _SIMPLE_MTX_INITIALIZER_NP;
+static simple_mtx_t ctx_list_mutex = SIMPLE_MTX_INITIALIZER;
 #endif
 
 struct u_trace_payload_buf {
index acfd649..90092d7 100644 (file)
@@ -77,7 +77,7 @@ typedef struct {
    uint32_t val;
 } simple_mtx_t;
 
-#define _SIMPLE_MTX_INITIALIZER_NP { 0 }
+#define SIMPLE_MTX_INITIALIZER { 0 }
 
 #define _SIMPLE_MTX_INVALID_VALUE 0xd0d0d0d0
 
@@ -151,7 +151,7 @@ typedef struct simple_mtx_t {
    mtx_t mtx;
 } simple_mtx_t;
 
-#define _SIMPLE_MTX_INITIALIZER_NP { UTIL_ONCE_FLAG_INIT }
+#define SIMPLE_MTX_INITIALIZER { UTIL_ONCE_FLAG_INIT }
 
 void _simple_mtx_plain_init_once(simple_mtx_t *mtx);
 
index 8c242d4..54a3cc0 100644 (file)
@@ -9,7 +9,7 @@
 #include "vn_renderer.h"
 
 struct vn_cs_renderer_protocol_info _vn_cs_renderer_protocol_info = {
-   .mutex = _SIMPLE_MTX_INITIALIZER_NP,
+   .mutex = SIMPLE_MTX_INITIALIZER,
 };
 
 static void
index 8e3f4f7..8171fe0 100644 (file)
@@ -216,7 +216,7 @@ static const VkQueryPipelineStatisticFlags overlay_query_flags =
 #define OVERLAY_QUERY_COUNT (11)
 
 static struct hash_table_u64 *vk_object_to_data = NULL;
-static simple_mtx_t vk_object_to_data_mutex = _SIMPLE_MTX_INITIALIZER_NP;
+static simple_mtx_t vk_object_to_data_mutex = SIMPLE_MTX_INITIALIZER;
 
 thread_local ImGuiContext* __MesaImGui;