diff options
45 files changed, 67 insertions, 71 deletions
diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h index 6eca2ca2c7a..af350b878ab 100644 --- a/src/gallium/auxiliary/os/os_thread.h +++ b/src/gallium/auxiliary/os/os_thread.h @@ -108,12 +108,8 @@ static inline int pipe_thread_is_self( pipe_thread thread ) return 0; } -/* pipe_mutex - */ -typedef mtx_t pipe_mutex; - #define pipe_static_mutex(mutex) \ - static pipe_mutex mutex = _MTX_INITIALIZER_NP + static mtx_t mutex = _MTX_INITIALIZER_NP #define pipe_mutex_init(mutex) \ (void) mtx_init(&(mutex), mtx_plain) @@ -131,11 +127,11 @@ typedef mtx_t pipe_mutex; __pipe_mutex_assert_locked(&(mutex)) static inline void -__pipe_mutex_assert_locked(pipe_mutex *mutex) +__pipe_mutex_assert_locked(mtx_t *mutex) { #ifdef DEBUG /* NOTE: this would not work for recursive mutexes, but - * pipe_mutex doesn't support those + * mtx_t doesn't support those */ int ret = mtx_trylock(mutex); assert(ret == thrd_busy); @@ -179,7 +175,7 @@ typedef struct { unsigned count; unsigned waiters; uint64_t sequence; - pipe_mutex mutex; + mtx_t mutex; pipe_condvar condvar; } pipe_barrier; @@ -231,7 +227,7 @@ static inline void pipe_barrier_wait(pipe_barrier *barrier) typedef struct { - pipe_mutex mutex; + mtx_t mutex; pipe_condvar cond; int counter; } pipe_semaphore; diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c index 7717d784f78..f5e761b1e6b 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c +++ b/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c @@ -81,7 +81,7 @@ struct fenced_manager /** * Following members are mutable and protected by this mutex. */ - pipe_mutex mutex; + mtx_t mutex; /** * Fenced buffer list. diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c index 4e36866e08c..26ce60314b9 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c @@ -78,7 +78,7 @@ struct pb_debug_buffer struct debug_stack_frame create_backtrace[PB_DEBUG_CREATE_BACKTRACE]; - pipe_mutex mutex; + mtx_t mutex; unsigned map_count; struct debug_stack_frame map_backtrace[PB_DEBUG_MAP_BACKTRACE]; @@ -95,7 +95,7 @@ struct pb_debug_manager pb_size underflow_size; pb_size overflow_size; - pipe_mutex mutex; + mtx_t mutex; struct list_head list; }; diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c index 023a028a1d0..ef7e5adac32 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c @@ -53,7 +53,7 @@ struct mm_pb_manager { struct pb_manager base; - pipe_mutex mutex; + mtx_t mutex; pb_size size; struct mem_block *heap; diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c index 98877b46352..3bfe720b185 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c @@ -56,7 +56,7 @@ struct pool_pb_manager { struct pb_manager base; - pipe_mutex mutex; + mtx_t mutex; pb_size bufSize; pb_size bufAlign; diff --git a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c index cc42eeae564..54aba980179 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c +++ b/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c @@ -128,7 +128,7 @@ struct pb_slab_manager */ struct list_head slabs; - pipe_mutex mutex; + mtx_t mutex; }; diff --git a/src/gallium/auxiliary/pipebuffer/pb_cache.h b/src/gallium/auxiliary/pipebuffer/pb_cache.h index 7000fcd1c5a..d082eca8b5d 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_cache.h +++ b/src/gallium/auxiliary/pipebuffer/pb_cache.h @@ -52,7 +52,7 @@ struct pb_cache */ struct list_head buckets[4]; - pipe_mutex mutex; + mtx_t mutex; uint64_t cache_size; uint64_t max_cache_size; unsigned usecs; diff --git a/src/gallium/auxiliary/pipebuffer/pb_slab.h b/src/gallium/auxiliary/pipebuffer/pb_slab.h index e779d95e08a..78a4bf7c47c 100644 --- a/src/gallium/auxiliary/pipebuffer/pb_slab.h +++ b/src/gallium/auxiliary/pipebuffer/pb_slab.h @@ -110,7 +110,7 @@ typedef bool (slab_can_reclaim_fn)(void *priv, struct pb_slab_entry *); */ struct pb_slabs { - pipe_mutex mutex; + mtx_t mutex; unsigned min_order; unsigned num_orders; diff --git a/src/gallium/auxiliary/util/u_debug_flush.c b/src/gallium/auxiliary/util/u_debug_flush.c index 52e72cd6d88..6a8a91d3130 100644 --- a/src/gallium/auxiliary/util/u_debug_flush.c +++ b/src/gallium/auxiliary/util/u_debug_flush.c @@ -53,7 +53,7 @@ struct debug_flush_buf { /* Atomic */ struct pipe_reference reference; /* Must be the first member. */ - pipe_mutex mutex; + mtx_t mutex; /* Immutable */ boolean supports_unsync; unsigned bt_depth; diff --git a/src/gallium/auxiliary/util/u_queue.h b/src/gallium/auxiliary/util/u_queue.h index 2e0a5a36e26..8d4804f5c6a 100644 --- a/src/gallium/auxiliary/util/u_queue.h +++ b/src/gallium/auxiliary/util/u_queue.h @@ -40,7 +40,7 @@ * Put this into your job structure. */ struct util_queue_fence { - pipe_mutex mutex; + mtx_t mutex; pipe_condvar cond; int signalled; }; @@ -57,7 +57,7 @@ struct util_queue_job { /* Put this into your context. */ struct util_queue { const char *name; - pipe_mutex lock; + mtx_t lock; pipe_condvar has_queued_cond; pipe_condvar has_space_cond; pipe_thread *threads; diff --git a/src/gallium/auxiliary/util/u_range.h b/src/gallium/auxiliary/util/u_range.h index a1da5e5a6f0..9055d7b6007 100644 --- a/src/gallium/auxiliary/util/u_range.h +++ b/src/gallium/auxiliary/util/u_range.h @@ -43,7 +43,7 @@ struct util_range { unsigned end; /* exclusive */ /* for the range to be consistent with multiple contexts: */ - pipe_mutex write_mutex; + mtx_t write_mutex; }; diff --git a/src/gallium/auxiliary/util/u_ringbuffer.c b/src/gallium/auxiliary/util/u_ringbuffer.c index a97236fe54c..19f82f52bf6 100644 --- a/src/gallium/auxiliary/util/u_ringbuffer.c +++ b/src/gallium/auxiliary/util/u_ringbuffer.c @@ -17,7 +17,7 @@ struct util_ringbuffer unsigned head; unsigned tail; pipe_condvar change; - pipe_mutex mutex; + mtx_t mutex; }; diff --git a/src/gallium/drivers/ddebug/dd_pipe.h b/src/gallium/drivers/ddebug/dd_pipe.h index 08cd1e3b9f1..dc7c325885d 100644 --- a/src/gallium/drivers/ddebug/dd_pipe.h +++ b/src/gallium/drivers/ddebug/dd_pipe.h @@ -235,7 +235,7 @@ struct dd_context * the thread dumps the record of the oldest unsignalled fence. */ pipe_thread thread; - pipe_mutex mutex; + mtx_t mutex; int kill_thread; struct pipe_resource *fence; struct pipe_transfer *fence_transfer; diff --git a/src/gallium/drivers/freedreno/freedreno_screen.h b/src/gallium/drivers/freedreno/freedreno_screen.h index 087b07e0b09..f2b1d8cea76 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.h +++ b/src/gallium/drivers/freedreno/freedreno_screen.h @@ -44,7 +44,7 @@ struct fd_bo; struct fd_screen { struct pipe_screen base; - pipe_mutex lock; + mtx_t lock; /* it would be tempting to use pipe_reference here, but that * really doesn't work well if it isn't the first member of diff --git a/src/gallium/drivers/llvmpipe/lp_fence.h b/src/gallium/drivers/llvmpipe/lp_fence.h index d7f0c153ec8..4fc0801a6f0 100644 --- a/src/gallium/drivers/llvmpipe/lp_fence.h +++ b/src/gallium/drivers/llvmpipe/lp_fence.h @@ -43,7 +43,7 @@ struct lp_fence struct pipe_reference reference; unsigned id; - pipe_mutex mutex; + mtx_t mutex; pipe_condvar signalled; boolean issued; diff --git a/src/gallium/drivers/llvmpipe/lp_scene.h b/src/gallium/drivers/llvmpipe/lp_scene.h index b1464bb54c4..da29057f1ef 100644 --- a/src/gallium/drivers/llvmpipe/lp_scene.h +++ b/src/gallium/drivers/llvmpipe/lp_scene.h @@ -174,7 +174,7 @@ struct lp_scene { unsigned tiles_x, tiles_y; int curr_x, curr_y; /**< for iterating over bins */ - pipe_mutex mutex; + mtx_t mutex; struct cmd_bin tile[TILES_X][TILES_Y]; struct data_block_list data; diff --git a/src/gallium/drivers/llvmpipe/lp_screen.h b/src/gallium/drivers/llvmpipe/lp_screen.h index 00bf20c8c5f..da702ad7753 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.h +++ b/src/gallium/drivers/llvmpipe/lp_screen.h @@ -56,7 +56,7 @@ struct llvmpipe_screen unsigned timestamp; struct lp_rasterizer *rast; - pipe_mutex rast_mutex; + mtx_t rast_mutex; }; diff --git a/src/gallium/drivers/nouveau/nv50/nv50_surface.c b/src/gallium/drivers/nouveau/nv50/nv50_surface.c index f5fa9d6cada..01bf14ba730 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_surface.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_surface.c @@ -821,7 +821,7 @@ struct nv50_blitter struct nv50_tsc_entry sampler[2]; /* nearest, bilinear */ - pipe_mutex mutex; + mtx_t mutex; }; struct nv50_blitctx diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c index d567d828948..96b2b5fa906 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c @@ -772,7 +772,7 @@ struct nvc0_blitter struct nv50_tsc_entry sampler[2]; /* nearest, bilinear */ - pipe_mutex mutex; + mtx_t mutex; struct nvc0_screen *screen; }; diff --git a/src/gallium/drivers/r300/r300_screen.h b/src/gallium/drivers/r300/r300_screen.h index 4b783af959d..952dc341ab7 100644 --- a/src/gallium/drivers/r300/r300_screen.h +++ b/src/gallium/drivers/r300/r300_screen.h @@ -48,7 +48,7 @@ struct r300_screen { /* The MSAA texture with CMASK access; */ struct pipe_resource *cmask_resource; - pipe_mutex cmask_mutex; + mtx_t cmask_mutex; }; diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h index 55d2d0bd5ff..726dbb30fcd 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.h +++ b/src/gallium/drivers/radeon/r600_pipe_common.h @@ -381,7 +381,7 @@ struct r600_common_screen { /* Auxiliary context. Mainly used to initialize resources. * It must be locked prior to using and flushed before unlocking. */ struct pipe_context *aux_context; - pipe_mutex aux_context_lock; + mtx_t aux_context_lock; /* This must be in the screen, because UE4 uses one context for * compilation and another one for rendering. @@ -394,7 +394,7 @@ struct r600_common_screen { unsigned num_shader_cache_hits; /* GPU load thread. */ - pipe_mutex gpu_load_mutex; + mtx_t gpu_load_mutex; pipe_thread gpu_load_thread; union r600_mmio_counters mmio_counters; volatile unsigned gpu_load_stop_thread; /* bool */ diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index ec7cf30ef7e..617ec2054c8 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -84,7 +84,7 @@ struct si_screen { bool use_monolithic_shaders; bool record_llvm_ir; - pipe_mutex shader_parts_mutex; + mtx_t shader_parts_mutex; struct si_shader_part *vs_prologs; struct si_shader_part *vs_epilogs; struct si_shader_part *tcs_epilogs; @@ -104,7 +104,7 @@ struct si_screen { * - GS and CS aren't cached, but it's certainly possible to cache * those as well. */ - pipe_mutex shader_cache_mutex; + mtx_t shader_cache_mutex; struct hash_table *shader_cache; /* Shader compiler queue for multithreaded compilation. */ diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index c38e7f560b6..17ffc5d8c78 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -278,7 +278,7 @@ struct si_shader_selector { struct util_queue_fence ready; struct si_compiler_ctx_state compiler_ctx_state; - pipe_mutex mutex; + mtx_t mutex; struct si_shader *first_variant; /* immutable after the first variant */ struct si_shader *last_variant; /* mutable */ diff --git a/src/gallium/drivers/rbug/rbug_context.h b/src/gallium/drivers/rbug/rbug_context.h index e99f6edc523..6f11fa46b5d 100644 --- a/src/gallium/drivers/rbug/rbug_context.h +++ b/src/gallium/drivers/rbug/rbug_context.h @@ -42,7 +42,7 @@ struct rbug_context { struct rbug_list list; /* call locking */ - pipe_mutex call_mutex; + mtx_t call_mutex; /* current state */ struct { @@ -58,7 +58,7 @@ struct rbug_context { } curr; /* draw locking */ - pipe_mutex draw_mutex; + mtx_t draw_mutex; pipe_condvar draw_cond; unsigned draw_num_rules; int draw_blocker; @@ -74,7 +74,7 @@ struct rbug_context { } draw_rule; /* list of state objects */ - pipe_mutex list_mutex; + mtx_t list_mutex; unsigned num_shaders; struct rbug_list shaders; }; diff --git a/src/gallium/drivers/rbug/rbug_screen.h b/src/gallium/drivers/rbug/rbug_screen.h index fd92374beda..67e28762b70 100644 --- a/src/gallium/drivers/rbug/rbug_screen.h +++ b/src/gallium/drivers/rbug/rbug_screen.h @@ -49,7 +49,7 @@ struct rbug_screen /* remote debugger */ struct rbug_rbug *rbug; - pipe_mutex list_mutex; + mtx_t list_mutex; int num_contexts; int num_resources; int num_surfaces; diff --git a/src/gallium/drivers/svga/svga_screen.h b/src/gallium/drivers/svga/svga_screen.h index 6cafeba1480..68834a69e2e 100644 --- a/src/gallium/drivers/svga/svga_screen.h +++ b/src/gallium/drivers/svga/svga_screen.h @@ -66,9 +66,9 @@ struct svga_screen } debug; unsigned texture_timestamp; - pipe_mutex tex_mutex; + mtx_t tex_mutex; - pipe_mutex swc_mutex; /* Used for buffer uploads */ + mtx_t swc_mutex; /* Used for buffer uploads */ /* which formats to translate depth formats into */ struct { diff --git a/src/gallium/drivers/svga/svga_screen_cache.h b/src/gallium/drivers/svga/svga_screen_cache.h index 619603a8238..2ade1025fca 100644 --- a/src/gallium/drivers/svga/svga_screen_cache.h +++ b/src/gallium/drivers/svga/svga_screen_cache.h @@ -105,7 +105,7 @@ struct svga_host_surface_cache_entry */ struct svga_host_surface_cache { - pipe_mutex mutex; + mtx_t mutex; /* Unused buffers are put in buckets to speed up lookups */ struct list_head bucket[SVGA_HOST_SURFACE_CACHE_BUCKETS]; diff --git a/src/gallium/drivers/vc4/vc4_screen.h b/src/gallium/drivers/vc4/vc4_screen.h index 1f91ad37f88..54751ff0b0d 100644 --- a/src/gallium/drivers/vc4/vc4_screen.h +++ b/src/gallium/drivers/vc4/vc4_screen.h @@ -77,14 +77,14 @@ struct vc4_screen { struct list_head *size_list; uint32_t size_list_size; - pipe_mutex lock; + mtx_t lock; uint32_t bo_size; uint32_t bo_count; } bo_cache; struct util_hash_table *bo_handles; - pipe_mutex bo_handles_mutex; + mtx_t bo_handles_mutex; uint32_t bo_size; uint32_t bo_count; diff --git a/src/gallium/state_trackers/dri/dri_screen.h b/src/gallium/state_trackers/dri/dri_screen.h index dc4692a1c6b..7f5fd13630f 100644 --- a/src/gallium/state_trackers/dri/dri_screen.h +++ b/src/gallium/state_trackers/dri/dri_screen.h @@ -89,7 +89,7 @@ struct dri_screen __DRIimage * (*lookup_egl_image)(struct dri_screen *ctx, void *handle); /* OpenCL interop */ - pipe_mutex opencl_func_mutex; + mtx_t opencl_func_mutex; opencl_dri_event_add_ref_t opencl_dri_event_add_ref; opencl_dri_event_release_t opencl_dri_event_release; opencl_dri_event_wait_t opencl_dri_event_wait; diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.h b/src/gallium/state_trackers/glx/xlib/xm_api.h index ccf35a5eb5a..06bf839c96e 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_api.h +++ b/src/gallium/state_trackers/glx/xlib/xm_api.h @@ -76,7 +76,7 @@ typedef struct xmesa_visual *XMesaVisual; struct xmesa_display { - pipe_mutex mutex; + mtx_t mutex; Display *display; struct pipe_screen *screen; diff --git a/src/gallium/state_trackers/hgl/hgl_context.h b/src/gallium/state_trackers/hgl/hgl_context.h index d2ec7fb49c4..5acb2f08db1 100644 --- a/src/gallium/state_trackers/hgl/hgl_context.h +++ b/src/gallium/state_trackers/hgl/hgl_context.h @@ -74,7 +74,7 @@ struct hgl_context Bitmap* bitmap; color_space colorSpace; - pipe_mutex fbMutex; + mtx_t fbMutex; struct hgl_buffer* draw; struct hgl_buffer* read; diff --git a/src/gallium/state_trackers/nine/nine_queue.c b/src/gallium/state_trackers/nine/nine_queue.c index b50b57bc90f..4724b6be584 100644 --- a/src/gallium/state_trackers/nine/nine_queue.c +++ b/src/gallium/state_trackers/nine/nine_queue.c @@ -74,8 +74,8 @@ struct nine_queue_pool { BOOL worker_wait; pipe_condvar event_pop; pipe_condvar event_push; - pipe_mutex mutex_pop; - pipe_mutex mutex_push; + mtx_t mutex_pop; + mtx_t mutex_push; }; /* Consumer functions: */ diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c index 90c49cf8f88..231e42272ec 100644 --- a/src/gallium/state_trackers/nine/nine_state.c +++ b/src/gallium/state_trackers/nine/nine_state.c @@ -64,13 +64,13 @@ struct csmt_context { struct nine_queue_pool* pool; BOOL terminate; pipe_condvar event_processed; - pipe_mutex mutex_processed; + mtx_t mutex_processed; struct NineDevice9 *device; BOOL processed; BOOL toPause; BOOL hasPaused; - pipe_mutex thread_running; - pipe_mutex thread_resume; + mtx_t thread_running; + mtx_t thread_resume; }; /* Wait for instruction to be processed. diff --git a/src/gallium/state_trackers/va/va_private.h b/src/gallium/state_trackers/va/va_private.h index a74446174ca..a7cedaeead6 100644 --- a/src/gallium/state_trackers/va/va_private.h +++ b/src/gallium/state_trackers/va/va_private.h @@ -209,7 +209,7 @@ typedef struct { struct vl_compositor compositor; struct vl_compositor_state cstate; vl_csc_matrix csc; - pipe_mutex mutex; + mtx_t mutex; } vlVaDriver; typedef struct { diff --git a/src/gallium/state_trackers/vdpau/vdpau_private.h b/src/gallium/state_trackers/vdpau/vdpau_private.h index cc20e5d7ca6..b36c0c4aec2 100644 --- a/src/gallium/state_trackers/vdpau/vdpau_private.h +++ b/src/gallium/state_trackers/vdpau/vdpau_private.h @@ -354,7 +354,7 @@ typedef struct struct pipe_context *context; struct vl_compositor compositor; struct pipe_sampler_view *dummy_sv; - pipe_mutex mutex; + mtx_t mutex; } vlVdpDevice; typedef struct @@ -439,7 +439,7 @@ typedef struct typedef struct { vlVdpDevice *device; - pipe_mutex mutex; + mtx_t mutex; struct pipe_video_codec *decoder; } vlVdpDecoder; diff --git a/src/gallium/targets/haiku-softpipe/GalliumContext.h b/src/gallium/targets/haiku-softpipe/GalliumContext.h index 22076cbb141..d8d75b91c06 100644 --- a/src/gallium/targets/haiku-softpipe/GalliumContext.h +++ b/src/gallium/targets/haiku-softpipe/GalliumContext.h @@ -50,7 +50,7 @@ private: // Context Management struct hgl_context* fContext[CONTEXT_MAX]; context_id fCurrentContext; - pipe_mutex fMutex; + mtx_t fMutex; }; diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h index b19d9767dad..a5154ffe7bf 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.h @@ -52,7 +52,7 @@ struct amdgpu_winsys { amdgpu_device_handle dev; - pipe_mutex bo_fence_lock; + mtx_t bo_fence_lock; int num_cs; /* The number of command streams created. */ unsigned num_total_rejected_cs; @@ -79,7 +79,7 @@ struct amdgpu_winsys { bool check_vm; /* List of all allocated buffers */ - pipe_mutex global_bo_list_lock; + mtx_t global_bo_list_lock; struct list_head global_bo_list; unsigned num_buffers; }; diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.h b/src/gallium/winsys/radeon/drm/radeon_drm_bo.h index 236e94cbbff..d5fababe702 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.h +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.h @@ -43,7 +43,7 @@ struct radeon_bo { struct pb_cache_entry cache_entry; void *ptr; - pipe_mutex map_mutex; + mtx_t map_mutex; unsigned map_count; bool use_reusable_pool; } real; diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c index a39a7bed5f4..6c6d920d032 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c @@ -57,7 +57,7 @@ pipe_static_mutex(fd_tab_mutex); * with multiple contexts (here command streams) backed by one winsys. */ static bool radeon_set_fd_access(struct radeon_drm_cs *applier, struct radeon_drm_cs **owner, - pipe_mutex *mutex, + mtx_t *mutex, unsigned request, const char *request_name, bool enable) { diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h index 04659e45ef7..362dab22398 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h +++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.h @@ -78,9 +78,9 @@ struct radeon_drm_winsys { struct util_hash_table *bo_handles; /* List of buffer virtual memory ranges. Protectded by bo_handles_mutex. */ struct util_hash_table *bo_vas; - pipe_mutex bo_handles_mutex; - pipe_mutex bo_va_mutex; - pipe_mutex bo_fence_lock; + mtx_t bo_handles_mutex; + mtx_t bo_va_mutex; + mtx_t bo_fence_lock; uint64_t va_offset; struct list_head va_holes; @@ -91,9 +91,9 @@ struct radeon_drm_winsys { uint32_t num_cpus; /* Number of CPUs. */ struct radeon_drm_cs *hyperz_owner; - pipe_mutex hyperz_owner_mutex; + mtx_t hyperz_owner_mutex; struct radeon_drm_cs *cmask_owner; - pipe_mutex cmask_owner_mutex; + mtx_t cmask_owner_mutex; /* multithreaded command submission */ struct util_queue cs_queue; diff --git a/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c b/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c index d049d1dbc46..4c5a12121f8 100644 --- a/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c +++ b/src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c @@ -70,7 +70,7 @@ struct fenced_manager /** * Following members are mutable and protected by this mutex. */ - pipe_mutex mutex; + mtx_t mutex; /** * Fenced buffer list. diff --git a/src/gallium/winsys/svga/drm/vmw_fence.c b/src/gallium/winsys/svga/drm/vmw_fence.c index bcf473a932c..0fbb078a84d 100644 --- a/src/gallium/winsys/svga/drm/vmw_fence.c +++ b/src/gallium/winsys/svga/drm/vmw_fence.c @@ -40,7 +40,7 @@ struct vmw_fence_ops struct pb_fence_ops base; struct vmw_winsys_screen *vws; - pipe_mutex mutex; + mtx_t mutex; /* * Protected by mutex; diff --git a/src/gallium/winsys/svga/drm/vmw_surface.h b/src/gallium/winsys/svga/drm/vmw_surface.h index f8b582d2cef..baeef5056bd 100644 --- a/src/gallium/winsys/svga/drm/vmw_surface.h +++ b/src/gallium/winsys/svga/drm/vmw_surface.h @@ -57,7 +57,7 @@ struct vmw_svga_winsys_surface unsigned next_present_no; uint32_t present_fences[VMW_MAX_PRESENTS]; - pipe_mutex mutex; + mtx_t mutex; struct svga_winsys_buffer *buf; /* Current backing guest buffer */ uint32_t mapcount; /* Number of mappers */ uint32_t map_mode; /* PIPE_TRANSFER_[READ|WRITE] */ diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.h b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.h index ffd7658ca81..f6772153a42 100644 --- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.h +++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.h @@ -59,11 +59,11 @@ struct virgl_drm_winsys struct list_head delayed; int num_delayed; unsigned usecs; - pipe_mutex mutex; + mtx_t mutex; struct util_hash_table *bo_handles; struct util_hash_table *bo_names; - pipe_mutex bo_handles_mutex; + mtx_t bo_handles_mutex; }; struct virgl_drm_cmd_buf { diff --git a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.h b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.h index b4faa70b67e..031037b6b5f 100644 --- a/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.h +++ b/src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.h @@ -48,7 +48,7 @@ struct virgl_vtest_winsys { struct list_head delayed; int num_delayed; unsigned usecs; - pipe_mutex mutex; + mtx_t mutex; }; struct virgl_hw_res { |