gallium/util: remove pipe_static_mutex()
authorTimothy Arceri <tarceri@itsqueeze.com>
Sun, 5 Mar 2017 01:32:02 +0000 (12:32 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 6 Mar 2017 21:48:16 +0000 (08:48 +1100)
This was made unnecessary with fd33a6bcd7f12.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
22 files changed:
src/gallium/auxiliary/hud/hud_cpufreq.c
src/gallium/auxiliary/hud/hud_diskstat.c
src/gallium/auxiliary/hud/hud_nic.c
src/gallium/auxiliary/hud/hud_sensors_temp.c
src/gallium/auxiliary/os/os_thread.h
src/gallium/auxiliary/rtasm/rtasm_execmem.c
src/gallium/auxiliary/util/u_debug_flush.c
src/gallium/auxiliary/util/u_debug_memory.c
src/gallium/auxiliary/util/u_debug_refcnt.c
src/gallium/auxiliary/util/u_debug_symbol.c
src/gallium/auxiliary/util/u_queue.c
src/gallium/drivers/trace/tr_dump.c
src/gallium/state_trackers/glx/xlib/xm_api.c
src/gallium/state_trackers/nine/nine_lock.c
src/gallium/state_trackers/omx/entrypoint.c
src/gallium/state_trackers/vdpau/htab.c
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
src/gallium/winsys/etnaviv/drm/etnaviv_drm_winsys.c
src/gallium/winsys/freedreno/drm/freedreno_drm_winsys.c
src/gallium/winsys/nouveau/drm/nouveau_drm_winsys.c
src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
src/gallium/winsys/virgl/drm/virgl_drm_winsys.c

index 78754b28a9ef7674528d10537787e69a171d7435..41e5827c663fe0ebc9252b8fe01ffb1a4f88bbb6 100644 (file)
@@ -62,7 +62,7 @@ struct cpufreq_info
 
 static int gcpufreq_count = 0;
 static struct list_head gcpufreq_list;
-pipe_static_mutex(gcpufreq_mutex);
+static mtx_t gcpufreq_mutex = _MTX_INITIALIZER_NP;
 
 static struct cpufreq_info *
 find_cfi_by_index(int cpu_index, int mode)
index af6e62d9da5668d88d4a4b65cb800e61dbcb92f2..fb64e3d906b122cf473fc4d7fbc5ba6ed65feb54 100644 (file)
@@ -82,7 +82,7 @@ struct diskstat_info
  */
 static int gdiskstat_count = 0;
 static struct list_head gdiskstat_list;
-pipe_static_mutex(gdiskstat_mutex);
+static mtx_t gdiskstat_mutex = _MTX_INITIALIZER_NP;
 
 static struct diskstat_info *
 find_dsi_by_name(const char *n, int mode)
index 634add162b8cb901a1e87c9e0e29b151e81371f6..2fbeaa51d92f2e3d022f3a7674bb6973b8743234 100644 (file)
@@ -67,7 +67,7 @@ struct nic_info
  */
 static int gnic_count = 0;
 static struct list_head gnic_list;
-pipe_static_mutex(gnic_mutex);
+static mtx_t gnic_mutex = _MTX_INITIALIZER_NP;
 
 static struct nic_info *
 find_nic_by_name(const char *n, int mode)
index 11b8a4cd5104b584480565020d6019af9622fe40..4d723cc4fff63e59f048693ade8cd084e4803409 100644 (file)
@@ -50,7 +50,7 @@
  */
 static int gsensors_temp_count = 0;
 static struct list_head gsensors_temp_list;
-pipe_static_mutex(gsensor_temp_mutex);
+static mtx_t gsensor_temp_mutex = _MTX_INITIALIZER_NP;
 
 struct sensors_temp_info
 {
index af350b878abde6885eed2091bcbf45606f755114..a6a9fea1f7ecd634e73a55ff883f5c831261e2c6 100644 (file)
@@ -108,9 +108,6 @@ static inline int pipe_thread_is_self( pipe_thread thread )
    return 0;
 }
 
-#define pipe_static_mutex(mutex) \
-   static mtx_t mutex = _MTX_INITIALIZER_NP
-
 #define pipe_mutex_init(mutex) \
    (void) mtx_init(&(mutex), mtx_plain)
 
index f7e605e9563323626de81403079fda27e80699b3..a60d52174ae5529824ed34127ba02c45dd14553c 100644 (file)
@@ -63,7 +63,7 @@
 
 #define EXEC_HEAP_SIZE (10*1024*1024)
 
-pipe_static_mutex(exec_mutex);
+static mtx_t exec_mutex = _MTX_INITIALIZER_NP;
 
 static struct mem_block *exec_heap = NULL;
 static unsigned char *exec_mem = NULL;
index 6a8a91d3130921d96d3418ec05fa997eb9604045..d12520501ed0f0c3eebe3677490c19977f52ba6d 100644 (file)
@@ -77,7 +77,7 @@ struct debug_flush_ctx {
    struct list_head head;
 };
 
-pipe_static_mutex(list_mutex);
+static mtx_t list_mutex = _MTX_INITIALIZER_NP;
 static struct list_head ctx_list = {&ctx_list, &ctx_list};
 
 static struct debug_stack_frame *
index f1cc8eb1b7c75226647d23632763c596e4643119..2f7031d6dfcfacf9440f66df4937f1589758af8b 100644 (file)
@@ -87,7 +87,7 @@ struct debug_memory_footer
 
 static struct list_head list = { &list, &list };
 
-pipe_static_mutex(list_mutex);
+static mtx_t list_mutex = _MTX_INITIALIZER_NP;
 
 static unsigned long last_no = 0;
 
index 0a4786442fc080e10f84916dfac738293f1b1909..eda95bbfff7ab6a6020a06181799808d1c255204 100644 (file)
@@ -52,7 +52,7 @@ static FILE *stream;
 /* TODO: maybe move this serial machinery to a stand-alone module and
  * expose it?
  */
-pipe_static_mutex(serials_mutex);
+static mtx_t serials_mutex = _MTX_INITIALIZER_NP;
 
 static struct util_hash_table *serials_hash;
 static unsigned serials_last;
index 10efdd593e5ba00262a3dd1d3530da852e2128ae..cfd354a6fe63073ae5b2082344e5f76ac9ed58cd 100644 (file)
@@ -271,7 +271,7 @@ debug_symbol_print(const void *addr)
 }
 
 struct util_hash_table* symbols_hash;
-pipe_static_mutex(symbols_mutex);
+static mtx_t symbols_mutex = _MTX_INITIALIZER_NP;
 
 static unsigned hash_ptr(void* p)
 {
index c84e0ad684097e9b091f911842213322295d81e4..ca637ad922b36fb287fbcc98cc6b35325770cb71 100644 (file)
@@ -40,7 +40,7 @@ static void util_queue_killall_and_wait(struct util_queue *queue);
 
 static once_flag atexit_once_flag = ONCE_FLAG_INIT;
 static struct list_head queue_list;
-pipe_static_mutex(exit_mutex);
+static mtx_t exit_mutex = _MTX_INITIALIZER_NP;
 
 static void
 atexit_handler(void)
index 112a69e29c1778776ea6f4c62f4b6ce5b01b96d6..b052e2a573e6ea6f8349414a3fd43b8ff4287bfa 100644 (file)
@@ -59,7 +59,7 @@
 
 static boolean close_stream = FALSE;
 static FILE *stream = NULL;
-pipe_static_mutex(call_mutex);
+static mtx_t call_mutex = _MTX_INITIALIZER_NP;
 static long unsigned call_no = 0;
 static boolean dumping = FALSE;
 
index 8d1b36056eeff820d7aa7cd8a245cdb1ee8f5daa..9297b6890509503f87e018d1475a26891abcc064 100644 (file)
@@ -189,7 +189,7 @@ xmesa_close_display(Display *display)
 static XMesaDisplay
 xmesa_init_display( Display *display )
 {
-   pipe_static_mutex(init_mutex);
+   static mtx_t init_mutex = _MTX_INITIALIZER_NP;
    XMesaDisplay xmdpy;
    XMesaExtDisplayInfo *info;
 
index 1136dad4942d0b66a2407f388c3e671b2b73970c..5b53559176984331062c9638fc9f60d41f584060 100644 (file)
@@ -48,7 +48,7 @@
 #include "os/os_thread.h"
 
 /* Global mutex as described by MSDN */
-pipe_static_mutex(d3dlock_global);
+static mtx_t d3dlock_global = _MTX_INITIALIZER_NP;
 
 void
 NineLockGlobalMutex()
index afcbd974e76c858e0e8c65b27501f41beaa45123..c12eb207ea838cd1b528f89f67524f41497fd35c 100644 (file)
@@ -45,7 +45,7 @@
 #include "vid_dec.h"
 #include "vid_enc.h"
 
-pipe_static_mutex(omx_lock);
+static mtx_t omx_lock = _MTX_INITIALIZER_NP;
 static Display *omx_display = NULL;
 static struct vl_screen *omx_screen = NULL;
 static unsigned omx_usecount = 0;
index 1d7b3fffab20ceea23b2643498e34f0e8ede2211..277ea0cfc0132b70213eafc374a84c2d4e47f63f 100644 (file)
@@ -30,7 +30,7 @@
 #include "vdpau_private.h"
 
 static struct handle_table *htab = NULL;
-pipe_static_mutex(htab_lock);
+static mtx_t htab_lock = _MTX_INITIALIZER_NP;
 
 boolean vlCreateHTAB(void)
 {
index 4a4e06cc3df95fd4ab22ae1b5074197cdb2dbec2..e16e13d9c2825e368dd8e11c550e82bd525d735f 100644 (file)
@@ -64,7 +64,7 @@
 #endif
 
 static struct util_hash_table *dev_tab = NULL;
-pipe_static_mutex(dev_tab_mutex);
+static mtx_t dev_tab_mutex = _MTX_INITIALIZER_NP;
 
 static unsigned cik_get_num_tile_pipes(struct amdgpu_gpu_info *info)
 {
index 3b34c300add8d2d5a199fde680893df7f422c862..141191f3d9318ed9e232ba42be599d7a8e36eaee 100644 (file)
@@ -69,7 +69,7 @@ screen_create(struct renderonly *ro)
 
 static struct util_hash_table *etna_tab = NULL;
 
-pipe_static_mutex(etna_screen_mutex);
+static mtx_t etna_screen_mutex = _MTX_INITIALIZER_NP;
 
 static void
 etna_drm_screen_destroy(struct pipe_screen *pscreen)
index e4785f83d96316d21c968baabaff4547c55f0c0a..9ccbce14a22ee2601c3a92e9b35af9e670840209 100644 (file)
@@ -42,7 +42,7 @@
 
 static struct util_hash_table *fd_tab = NULL;
 
-pipe_static_mutex(fd_screen_mutex);
+static mtx_t fd_screen_mutex = _MTX_INITIALIZER_NP;
 
 static void
 fd_drm_screen_destroy(struct pipe_screen *pscreen)
index cc9dfa7f7645c8c201c5fd113ba80041ba3a76d7..f7b1e5ec6257fa86538cb83a5c11aa9aa1ee5300 100644 (file)
@@ -19,7 +19,7 @@
 
 static struct util_hash_table *fd_tab = NULL;
 
-pipe_static_mutex(nouveau_screen_mutex);
+static mtx_t nouveau_screen_mutex = _MTX_INITIALIZER_NP;
 
 bool nouveau_drm_screen_unref(struct nouveau_screen *screen)
 {
index 6c6d920d0324b7c16b3098157b6205c9d033fd2d..2726237329a65277dda954f5be8c940b3b344aa5 100644 (file)
@@ -47,7 +47,7 @@
 #include <radeon_surface.h>
 
 static struct util_hash_table *fd_tab = NULL;
-pipe_static_mutex(fd_tab_mutex);
+static mtx_t fd_tab_mutex = _MTX_INITIALIZER_NP;
 
 /* Enable/disable feature access for one command stream.
  * If enable == true, return true on success.
index 86e0470e682be791288c0ca2611a139586ca16c8..73538730f5ebdd968719a695750b331fe9e31b3a 100644 (file)
@@ -806,7 +806,7 @@ virgl_drm_winsys_create(int drmFD)
 }
 
 static struct util_hash_table *fd_tab = NULL;
-pipe_static_mutex(virgl_screen_mutex);
+static mtx_t virgl_screen_mutex = _MTX_INITIALIZER_NP;
 
 static void
 virgl_drm_screen_destroy(struct pipe_screen *pscreen)