util: remove LIST_INITHEAD macro
authorTimothy Arceri <tarceri@itsqueeze.com>
Sun, 27 Oct 2019 22:49:39 +0000 (09:49 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 28 Oct 2019 11:24:38 +0000 (11:24 +0000)
Just use the inlined function directly. The macro was replaced with
the function in ebe304fa540f.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
39 files changed:
src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
src/gallium/auxiliary/hud/hud_context.c
src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c
src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c
src/gallium/auxiliary/pipebuffer/pb_cache.c
src/gallium/auxiliary/pipebuffer/pb_slab.c
src/gallium/auxiliary/util/u_dirty_surfaces.h
src/gallium/auxiliary/util/u_threaded_context.c
src/gallium/drivers/nouveau/nouveau_fence.c
src/gallium/drivers/nouveau/nouveau_mm.c
src/gallium/drivers/nouveau/nv30/nv30_screen.c
src/gallium/drivers/r600/r600_asm.c
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/r600/r600_query.c
src/gallium/drivers/r600/radeon_vce.c
src/gallium/drivers/radeon/radeon_vce.c
src/gallium/drivers/radeonsi/gfx10_query.c
src/gallium/drivers/radeonsi/si_query.c
src/gallium/drivers/svga/svga_context.c
src/gallium/drivers/svga/svga_resource_buffer.c
src/gallium/drivers/svga/svga_screen_cache.c
src/gallium/state_trackers/omx/bellagio/vid_dec_h264.c
src/gallium/state_trackers/omx/bellagio/vid_dec_h265.c
src/gallium/state_trackers/omx/bellagio/vid_enc.c
src/gallium/state_trackers/omx/tizonia/h264dprc.c
src/gallium/state_trackers/omx/tizonia/h264einport.c
src/gallium/state_trackers/omx/tizonia/h264eprc.c
src/gallium/state_trackers/omx/vid_enc_common.c
src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
src/gallium/winsys/radeon/drm/radeon_drm_bo.c
src/gallium/winsys/svga/drm/pb_buffer_simple_fenced.c
src/gallium/winsys/svga/drm/vmw_fence.c
src/gallium/winsys/virgl/common/virgl_resource_cache.c
src/mesa/state_tracker/st_context.c
src/util/list.h
src/util/u_queue.c
src/vulkan/overlay-layer/overlay.cpp

index c85bbe4cee88bfe3d0f80243186a481ae72f2e18..934caf17d25bb1e89f11ed4e306a8919bfb025f7 100644 (file)
@@ -190,7 +190,7 @@ radv_amdgpu_winsys_create(int fd, uint64_t debug_flags, uint64_t perftest_flags)
        ws->use_local_bos = perftest_flags & RADV_PERFTEST_LOCAL_BOS;
        ws->zero_all_vram_allocs = debug_flags & RADV_DEBUG_ZERO_VRAM;
        ws->batchchain = !(perftest_flags & RADV_PERFTEST_NO_BATCHCHAIN);
-       LIST_INITHEAD(&ws->global_bo_list);
+       list_inithead(&ws->global_bo_list);
        pthread_mutex_init(&ws->global_bo_list_lock, NULL);
        ws->base.query_info = radv_amdgpu_winsys_query_info;
        ws->base.query_value = radv_amdgpu_winsys_query_value;
index d3780e28db375a51d04e29655ede324dae88afc5..631529fd6bad1eb65ac957bfc74c2459a8071d4a 100644 (file)
@@ -898,7 +898,7 @@ hud_pane_create(struct hud_context *hud,
    pane->sort_items = sort_items;
    pane->initial_max_value = max_value;
    hud_pane_set_max_value(pane, max_value);
-   LIST_INITHEAD(&pane->graph_list);
+   list_inithead(&pane->graph_list);
    return pane;
 }
 
@@ -1885,7 +1885,7 @@ hud_create(struct cso_context *cso, struct hud_context *share)
    hud->constbuf.buffer_size = sizeof(hud->constants);
    hud->constbuf.user_buffer = &hud->constants;
 
-   LIST_INITHEAD(&hud->pane_list);
+   list_inithead(&hud->pane_list);
 
    /* setup sig handler once for all hud contexts */
 #ifdef PIPE_OS_UNIX
index ec1819119233e4d1bca4e4f618ac88f9e2a4d1c6..770146a9b7b50bbe458df1db1b5a168c6f1ab5bf 100644 (file)
@@ -1027,10 +1027,10 @@ fenced_bufmgr_create(struct pb_manager *provider,
    fenced_mgr->max_buffer_size = max_buffer_size;
    fenced_mgr->max_cpu_total_size = max_cpu_total_size;
 
-   LIST_INITHEAD(&fenced_mgr->fenced);
+   list_inithead(&fenced_mgr->fenced);
    fenced_mgr->num_fenced = 0;
 
-   LIST_INITHEAD(&fenced_mgr->unfenced);
+   list_inithead(&fenced_mgr->unfenced);
    fenced_mgr->num_unfenced = 0;
 
    (void) mtx_init(&fenced_mgr->mutex, mtx_plain);
index 3f501c298ce2813b920d813120e655daf0c1f6e2..50bd51524522df727af821cd90304ace49b44a8d 100644 (file)
@@ -477,7 +477,7 @@ pb_debug_manager_create(struct pb_manager *provider,
    mgr->overflow_size = overflow_size;
     
    (void) mtx_init(&mgr->mutex, mtx_plain);
-   LIST_INITHEAD(&mgr->list);
+   list_inithead(&mgr->list);
 
    return &mgr->base;
 }
index 8a3b28761490e846776adf35c8208f68e1ac9013..431f24b54c4e7d1bef38f75f8373775f65cd89f5 100644 (file)
@@ -333,8 +333,8 @@ pb_slab_create(struct pb_slab_manager *mgr)
       goto out_err1;
    }
 
-   LIST_INITHEAD(&slab->head);
-   LIST_INITHEAD(&slab->freeBuffers);
+   list_inithead(&slab->head);
+   list_inithead(&slab->freeBuffers);
    slab->numBuffers = numBuffers;
    slab->numFree = 0;
    slab->mgr = mgr;
@@ -470,7 +470,7 @@ pb_slab_manager_create(struct pb_manager *provider,
    mgr->slabSize = slabSize;
    mgr->desc = *desc;
 
-   LIST_INITHEAD(&mgr->slabs);
+   list_inithead(&mgr->slabs);
    
    (void) mtx_init(&mgr->mutex, mtx_plain);
 
index 2b9ad4980458bcb0b252ad0375c5f26662f2c96c..95dab4d256c2eac0ab09494b4734f412feecff7c 100644 (file)
@@ -290,7 +290,7 @@ pb_cache_init(struct pb_cache *mgr, uint num_heaps,
       return;
 
    for (i = 0; i < num_heaps; i++)
-      LIST_INITHEAD(&mgr->buckets[i]);
+      list_inithead(&mgr->buckets[i]);
 
    (void) mtx_init(&mgr->mutex, mtx_plain);
    mgr->cache_size = 0;
index 27022970870cd38f9ab24031d88d5a17a6313162..060314b707c66ab0fa0011ec0d9511a2c85b5981 100644 (file)
@@ -212,7 +212,7 @@ pb_slabs_init(struct pb_slabs *slabs,
    slabs->slab_alloc = slab_alloc;
    slabs->slab_free = slab_free;
 
-   LIST_INITHEAD(&slabs->reclaim);
+   list_inithead(&slabs->reclaim);
 
    num_groups = slabs->num_orders * slabs->num_heaps;
    slabs->groups = CALLOC(num_groups, sizeof(*slabs->groups));
@@ -221,7 +221,7 @@ pb_slabs_init(struct pb_slabs *slabs,
 
    for (i = 0; i < num_groups; ++i) {
       struct pb_slab_group *group = &slabs->groups[i];
-      LIST_INITHEAD(&group->slabs);
+      list_inithead(&group->slabs);
    }
 
    (void) mtx_init(&slabs->mutex, mtx_plain);
index ccde8a8c11585fc3d711f62f61151fbd2f3db23c..c70c3317943c4d28411aa99a9838b5d4a02cc93d 100644 (file)
@@ -50,7 +50,7 @@ struct util_dirty_surface
 static inline void
 util_dirty_surfaces_init(struct util_dirty_surfaces *ds)
 {
-   LIST_INITHEAD(&ds->dirty_list);
+   list_inithead(&ds->dirty_list);
 }
 
 static inline void
@@ -93,7 +93,7 @@ util_dirty_surfaces_use_for_sampling_with(struct pipe_context *pipe, struct util
 static inline void
 util_dirty_surface_init(struct util_dirty_surface *ds)
 {
-   LIST_INITHEAD(&ds->dirty_list);
+   list_inithead(&ds->dirty_list);
 }
 
 static inline boolean
index b50b2c0d24ec4622b60d02764a31d51eb9650c36..c5ee7ea7aac29c80669d0f0af9191e319aabcfa7 100644 (file)
@@ -2627,7 +2627,7 @@ threaded_context_create(struct pipe_context *pipe,
       util_queue_fence_init(&tc->batch_slots[i].fence);
    }
 
-   LIST_INITHEAD(&tc->unflushed_queries);
+   list_inithead(&tc->unflushed_queries);
 
    slab_create_child(&tc->pool_transfers, parent_transfer_pool);
 
index d14c59b2dd15d271a3e2bbd45863f0c14bb84569..767e27f0719c74cf511050ee9767816797ba0790 100644 (file)
@@ -38,7 +38,7 @@ nouveau_fence_new(struct nouveau_screen *screen, struct nouveau_fence **fence)
 
    (*fence)->screen = screen;
    (*fence)->ref = 1;
-   LIST_INITHEAD(&(*fence)->work);
+   list_inithead(&(*fence)->work);
 
    return true;
 }
index 43b3d99f48a7e5a6de75de5f4460ecfd6953ef45..9e5f908a10da6120d2bd55025c8d2053f5d669eb 100644 (file)
@@ -142,7 +142,7 @@ mm_slab_new(struct nouveau_mman *cache, int chunk_order)
       return PIPE_ERROR_OUT_OF_MEMORY;
    }
 
-   LIST_INITHEAD(&slab->head);
+   list_inithead(&slab->head);
 
    slab->cache = cache;
    slab->order = chunk_order;
@@ -255,9 +255,9 @@ nouveau_mm_create(struct nouveau_device *dev, uint32_t domain,
    cache->allocated = 0;
 
    for (i = 0; i < MM_NUM_BUCKETS; ++i) {
-      LIST_INITHEAD(&cache->bucket[i].free);
-      LIST_INITHEAD(&cache->bucket[i].used);
-      LIST_INITHEAD(&cache->bucket[i].full);
+      list_inithead(&cache->bucket[i].free);
+      list_inithead(&cache->bucket[i].used);
+      list_inithead(&cache->bucket[i].full);
    }
 
    return cache;
index bd25819b7177bb495e764ee30046ab537cfaf365..8572d46ee4403ca452f15289e701783ee4097ad9 100644 (file)
@@ -655,7 +655,7 @@ nv30_screen_create(struct nouveau_device *dev)
    if (ret)
       FAIL_SCREEN_INIT("error creating query heap: %d\n", ret);
 
-   LIST_INITHEAD(&screen->queries);
+   list_inithead(&screen->queries);
 
    /* Vertex program resources (code/data), currently 6 of the constant
     * slots are reserved to implement user clipping planes
index 4ba77c535f9b05cd44bb48ddb51094bd8608ea71..2fc9b1579b7244062d33d782a91f8c70ec12bb27 100644 (file)
@@ -54,11 +54,11 @@ static struct r600_bytecode_cf *r600_bytecode_cf(void)
 
        if (!cf)
                return NULL;
-       LIST_INITHEAD(&cf->list);
-       LIST_INITHEAD(&cf->alu);
-       LIST_INITHEAD(&cf->vtx);
-       LIST_INITHEAD(&cf->tex);
-       LIST_INITHEAD(&cf->gds);
+       list_inithead(&cf->list);
+       list_inithead(&cf->alu);
+       list_inithead(&cf->vtx);
+       list_inithead(&cf->tex);
+       list_inithead(&cf->gds);
        return cf;
 }
 
@@ -68,7 +68,7 @@ static struct r600_bytecode_alu *r600_bytecode_alu(void)
 
        if (!alu)
                return NULL;
-       LIST_INITHEAD(&alu->list);
+       list_inithead(&alu->list);
        return alu;
 }
 
@@ -78,7 +78,7 @@ static struct r600_bytecode_vtx *r600_bytecode_vtx(void)
 
        if (!vtx)
                return NULL;
-       LIST_INITHEAD(&vtx->list);
+       list_inithead(&vtx->list);
        return vtx;
 }
 
@@ -88,7 +88,7 @@ static struct r600_bytecode_tex *r600_bytecode_tex(void)
 
        if (!tex)
                return NULL;
-       LIST_INITHEAD(&tex->list);
+       list_inithead(&tex->list);
        return tex;
 }
 
@@ -98,7 +98,7 @@ static struct r600_bytecode_gds *r600_bytecode_gds(void)
 
        if (gds == NULL)
                return NULL;
-       LIST_INITHEAD(&gds->list);
+       list_inithead(&gds->list);
        return gds;
 }
 
@@ -154,7 +154,7 @@ void r600_bytecode_init(struct r600_bytecode *bc,
                bc->r6xx_nop_after_rel_dst = 0;
        }
 
-       LIST_INITHEAD(&bc->cf);
+       list_inithead(&bc->cf);
        bc->chip_class = chip_class;
        bc->family = family;
        bc->has_compressed_msaa_texturing = has_compressed_msaa_texturing;
@@ -1867,30 +1867,30 @@ void r600_bytecode_clear(struct r600_bytecode *bc)
                        free(alu);
                }
 
-               LIST_INITHEAD(&cf->alu);
+               list_inithead(&cf->alu);
 
                LIST_FOR_EACH_ENTRY_SAFE(tex, next_tex, &cf->tex, list) {
                        free(tex);
                }
 
-               LIST_INITHEAD(&cf->tex);
+               list_inithead(&cf->tex);
 
                LIST_FOR_EACH_ENTRY_SAFE(vtx, next_vtx, &cf->vtx, list) {
                        free(vtx);
                }
 
-               LIST_INITHEAD(&cf->vtx);
+               list_inithead(&cf->vtx);
 
                LIST_FOR_EACH_ENTRY_SAFE(gds, next_gds, &cf->gds, list) {
                        free(gds);
                }
 
-               LIST_INITHEAD(&cf->gds);
+               list_inithead(&cf->gds);
 
                free(cf);
        }
 
-       LIST_INITHEAD(&cf->list);
+       list_inithead(&cf->list);
 }
 
 static int print_swizzle(unsigned swz)
index ca8669b98b90195324a9145cfada04a1d45a22cb..831d348b43093bfe7f2dc9e0f02fff2d571fafe9 100644 (file)
@@ -155,7 +155,7 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen,
                goto fail;
 
        rctx->screen = rscreen;
-       LIST_INITHEAD(&rctx->texture_buffers);
+       list_inithead(&rctx->texture_buffers);
 
        r600_init_blit_functions(rctx);
 
index 0a41ac81384b21834ebd7c53474c132bbaf950a7..5bd059fd0e37371482b9af2ea59e68f7ed8f2c5d 100644 (file)
@@ -2125,7 +2125,7 @@ void r600_query_init(struct r600_common_context *rctx)
        if (((struct r600_common_screen*)rctx->b.screen)->info.num_render_backends > 0)
            rctx->b.render_condition = r600_render_condition;
 
-       LIST_INITHEAD(&rctx->active_queries);
+       list_inithead(&rctx->active_queries);
 }
 
 void r600_init_screen_query_functions(struct r600_common_screen *rscreen)
index 4dae56f95cec1676849c8b9628d525dfdf2dd91f..fc908d07bcad7b13b6e6062c351f75f6b9a39612 100644 (file)
@@ -97,7 +97,7 @@ static void reset_cpb(struct rvce_encoder *enc)
 {
        unsigned i;
 
-       LIST_INITHEAD(&enc->cpb_slots);
+       list_inithead(&enc->cpb_slots);
        for (i = 0; i < enc->cpb_num; ++i) {
                struct rvce_cpb_slot *slot = &enc->cpb_array[i];
                slot->index = i;
index 264b96b83c98f8f10d7ff01f3887f50bdf9eaa86..ff2852f3ec0bc068a4d54a55dfaff4fd8bd10a6c 100644 (file)
@@ -91,7 +91,7 @@ static void reset_cpb(struct rvce_encoder *enc)
 {
        unsigned i;
 
-       LIST_INITHEAD(&enc->cpb_slots);
+       list_inithead(&enc->cpb_slots);
        for (i = 0; i < enc->cpb_num; ++i) {
                struct rvce_cpb_slot *slot = &enc->cpb_array[i];
                slot->index = i;
index 56ecbd54850e523591286419b5cde23c2e9b5d26..f87420e36bfe41b03ec8fef1d9157ff2f90725f3 100644 (file)
@@ -504,7 +504,7 @@ struct pipe_query *gfx10_sh_query_create(struct si_screen *screen,
 
 void gfx10_init_query(struct si_context *sctx)
 {
-       LIST_INITHEAD(&sctx->shader_query_buffers);
+       list_inithead(&sctx->shader_query_buffers);
        sctx->atoms.s.shader_query.emit = emit_shader_query;
 }
 
index 53cedb5b83c2cb1d7bcab50aa957a15a8737ea1e..8871b46d4052bda5880db3bb6d7f1d354340401a 100644 (file)
@@ -1923,7 +1923,7 @@ void si_init_query_functions(struct si_context *sctx)
                sctx->b.render_condition = si_render_condition;
        }
 
-       LIST_INITHEAD(&sctx->active_queries);
+       list_inithead(&sctx->active_queries);
 }
 
 void si_init_screen_query_functions(struct si_screen *sscreen)
index 104a551356d02ced79ce9cde129c76fb6c49eb19..cdc222e2438c272823b346a9845017f3d68d6ec1 100644 (file)
@@ -136,7 +136,7 @@ svga_context_create(struct pipe_screen *screen, void *priv, unsigned flags)
    if (!svga)
       goto done;
 
-   LIST_INITHEAD(&svga->dirty_buffers);
+   list_inithead(&svga->dirty_buffers);
 
    svga->pipe.screen = screen;
    svga->pipe.priv = priv;
index 712fffc83d392e43effff93d3b4ae2ba33b864da..1362ffed2b882b236e44a5e93f0493491838c6e9 100644 (file)
@@ -442,7 +442,7 @@ svga_buffer_create(struct pipe_screen *screen,
    sbuf->b.b.screen = screen;
    bind_flags = template->bind & ~PIPE_BIND_CUSTOM;
 
-   LIST_INITHEAD(&sbuf->surfaces);
+   list_inithead(&sbuf->surfaces);
 
    if (bind_flags & PIPE_BIND_CONSTANT_BUFFER) {
       /* Constant buffers can only have the PIPE_BIND_CONSTANT_BUFFER
index 1f572c6c115b67d84b3395c8777704f9d9525837..2f8ff91fbee152f9dfbe7404e8291ae603f55d67 100644 (file)
@@ -436,15 +436,15 @@ svga_screen_cache_init(struct svga_screen *svgascreen)
    (void) mtx_init(&cache->mutex, mtx_plain);
 
    for (i = 0; i < SVGA_HOST_SURFACE_CACHE_BUCKETS; ++i)
-      LIST_INITHEAD(&cache->bucket[i]);
+      list_inithead(&cache->bucket[i]);
 
-   LIST_INITHEAD(&cache->unused);
+   list_inithead(&cache->unused);
 
-   LIST_INITHEAD(&cache->validated);
+   list_inithead(&cache->validated);
 
-   LIST_INITHEAD(&cache->invalidated);
+   list_inithead(&cache->invalidated);
 
-   LIST_INITHEAD(&cache->empty);
+   list_inithead(&cache->empty);
    for (i = 0; i < SVGA_HOST_SURFACE_CACHE_SIZE; ++i)
       LIST_ADDTAIL(&cache->entries[i].head, &cache->empty);
 
index e8f7aa5cf18a43c5d33a43bb6a2643909096ae6a..1a198a97e961acffbbd29efa5fca37e9813fbb77 100644 (file)
@@ -49,7 +49,7 @@ void vid_dec_h264_Init(vid_dec_PrivateType *priv)
    priv->EndFrame = vid_dec_h264_EndFrame;
    priv->Flush = vid_dec_h264_Flush;
 
-   LIST_INITHEAD(&priv->codec_data.h264.dpb_list);
+   list_inithead(&priv->codec_data.h264.dpb_list);
    priv->picture.h264.field_order_cnt[0] = priv->picture.h264.field_order_cnt[1] = INT_MAX;
    priv->first_buf_in_frame = true;
 }
index 3242dbe11c864e04a5e664b304d69da7877c4f99..0b8c17a165e810262d0da533aa3c5fdc73edf827 100644 (file)
@@ -1002,7 +1002,7 @@ void vid_dec_h265_Init(vid_dec_PrivateType *priv)
 {
    priv->picture.base.profile = PIPE_VIDEO_PROFILE_HEVC_MAIN;
 
-   LIST_INITHEAD(&priv->codec_data.h265.dpb_list);
+   list_inithead(&priv->codec_data.h265.dpb_list);
    priv->codec_data.h265.ref_pic_set_list = (struct ref_pic_set *)
       CALLOC(MAX_NUM_REF_PICS, sizeof(struct ref_pic_set));
 
index 9f25be9fafe7983efec345e7e0cad73eda1f1952..0ba06a28bcff9e6edb10b88219acaabda0fd5b97 100644 (file)
@@ -235,10 +235,10 @@ static OMX_ERRORTYPE vid_enc_Constructor(OMX_COMPONENTTYPE *comp, OMX_STRING nam
    priv->scale.xWidth = OMX_VID_ENC_SCALING_WIDTH_DEFAULT;
    priv->scale.xHeight = OMX_VID_ENC_SCALING_WIDTH_DEFAULT;
 
-   LIST_INITHEAD(&priv->free_tasks);
-   LIST_INITHEAD(&priv->used_tasks);
-   LIST_INITHEAD(&priv->b_frames);
-   LIST_INITHEAD(&priv->stacked_tasks);
+   list_inithead(&priv->free_tasks);
+   list_inithead(&priv->used_tasks);
+   list_inithead(&priv->b_frames);
+   list_inithead(&priv->stacked_tasks);
 
    return OMX_ErrorNone;
 }
@@ -658,7 +658,7 @@ static OMX_ERRORTYPE vid_enc_AllocateInBuffer(omx_base_PortType *port, OMX_INOUT
       return OMX_ErrorInsufficientResources;
    }
 
-   LIST_INITHEAD(&inp->tasks);
+   list_inithead(&inp->tasks);
 
    FREE((*buf)->pBuffer);
    r = enc_AllocateBackTexture(port, &inp->resource, &inp->transfer, &(*buf)->pBuffer);
@@ -687,7 +687,7 @@ static OMX_ERRORTYPE vid_enc_UseInBuffer(omx_base_PortType *port, OMX_BUFFERHEAD
       return OMX_ErrorInsufficientResources;
    }
 
-   LIST_INITHEAD(&inp->tasks);
+   list_inithead(&inp->tasks);
 
    return OMX_ErrorNone;
 }
index b900c75a57d5d0a0cd12a204d212ef9a19157a84..cac62a82e72b723c2f520494a960c4addd254547 100644 (file)
@@ -432,7 +432,7 @@ static OMX_ERRORTYPE h264d_prc_allocate_resources(void *ap_obj, OMX_U32 a_pid)
       return OMX_ErrorInsufficientResources;
    }
 
-   LIST_INITHEAD(&priv->codec_data.h264.dpb_list);
+   list_inithead(&priv->codec_data.h264.dpb_list);
 
    priv->video_buffer_map = util_hash_table_create(handle_hash, handle_compare);
 
index 3f34e05e0b2cdb957d0e9151418df6d97df80f7c..609a1782b6b6281561757b59b6f5c0141f7346c2 100644 (file)
@@ -112,7 +112,7 @@ static OMX_ERRORTYPE h264e_inport_AllocateBuffer(const void * ap_obj, OMX_HANDLE
      return OMX_ErrorInsufficientResources;
    }
 
-   LIST_INITHEAD(&inp->tasks);
+   list_inithead(&inp->tasks);
 
    r = enc_AllocateBackTexture(ap_hdl, idx, &inp->resource, &inp->transfer, &(*buf)->pBuffer);
 
@@ -143,7 +143,7 @@ static OMX_ERRORTYPE h264e_inport_UseBuffer(const void * ap_obj, OMX_HANDLETYPE
      return OMX_ErrorInsufficientResources;
    }
 
-   LIST_INITHEAD(&inp->tasks);
+   list_inithead(&inp->tasks);
 
    return OMX_ErrorNone;
 }
index b6bba151399f693cee98995f982f33074c8001e9..a714d422e1d0f2f55334f0f3f8162a4813bbc60f 100644 (file)
@@ -426,10 +426,10 @@ static OMX_ERRORTYPE h264e_prc_create_encoder(void *ap_obj)
    if (!priv->t_pipe)
       return OMX_ErrorInsufficientResources;
 
-   LIST_INITHEAD(&priv->free_tasks);
-   LIST_INITHEAD(&priv->used_tasks);
-   LIST_INITHEAD(&priv->b_frames);
-   LIST_INITHEAD(&priv->stacked_tasks);
+   list_inithead(&priv->free_tasks);
+   list_inithead(&priv->used_tasks);
+   list_inithead(&priv->b_frames);
+   list_inithead(&priv->stacked_tasks);
 
    return OMX_ErrorNone;
 }
index 3e8ca3202a69573b084953688c37380c7b58f41b..0dfab5b1eb83bb1320baae8420b43840430a1577 100644 (file)
@@ -50,7 +50,7 @@ void enc_MoveTasks(struct list_head *from, struct list_head *to)
    from->next->prev = to->prev;
    from->prev->next = to;
    to->prev = from->prev;
-   LIST_INITHEAD(from);
+   list_inithead(from);
 }
 
 static void enc_GetPictureParamPreset(struct pipe_h264_enc_picture_desc *picture)
index 6a39596711794c8c9fb1cd3accac9d78d09beed1..edef12ccf23ea93fbe5cb1fb913e78174d9b6993 100644 (file)
@@ -664,7 +664,7 @@ struct pb_slab *amdgpu_bo_slab_alloc(void *priv, unsigned heap,
    if (!slab->entries)
       goto fail_buffer;
 
-   LIST_INITHEAD(&slab->base.free);
+   list_inithead(&slab->base.free);
 
    base_id = __sync_fetch_and_add(&ws->next_bo_unique_id, slab->base.num_entries);
 
@@ -1017,7 +1017,7 @@ amdgpu_bo_sparse_create(struct amdgpu_winsys *ws, uint64_t size,
    if (!bo->u.sparse.commitments)
       goto error_alloc_commitments;
 
-   LIST_INITHEAD(&bo->u.sparse.backing);
+   list_inithead(&bo->u.sparse.backing);
 
    /* For simplicity, we always map a multiple of the page size. */
    map_size = align64(size, RADEON_SPARSE_PAGE_SIZE);
index 7864b21e3c7b1008ecd748615d2e8d94ec594385..568d3852893976e4ac1beee2fc9471feb38039ba 100644 (file)
@@ -383,7 +383,7 @@ amdgpu_winsys_create(int fd, const struct pipe_screen_config *config,
       /* init reference */
       pipe_reference_init(&aws->reference, 1);
 
-      LIST_INITHEAD(&aws->global_bo_list);
+      list_inithead(&aws->global_bo_list);
       aws->bo_export_table = util_hash_table_create(hash_pointer, compare_pointers);
 
       (void) simple_mtx_init(&aws->global_bo_list_lock, mtx_plain);
index c0a763d45baee588f47c874e5a6567a5a20ba2ac..5fb00f13dfbe98d747253472daab03dab4e06d03 100644 (file)
@@ -796,7 +796,7 @@ struct pb_slab *radeon_bo_slab_alloc(void *priv, unsigned heap,
     if (!slab->entries)
         goto fail_buffer;
 
-    LIST_INITHEAD(&slab->base.free);
+    list_inithead(&slab->base.free);
 
     base_hash = __sync_fetch_and_add(&ws->next_bo_hash, slab->base.num_entries);
 
index f7211c29ac622619c746c716d8fcb4b9ada8ebfe..9ab9fd1f2cc5c576f0fede4fd791efbd9418d7cf 100644 (file)
@@ -835,10 +835,10 @@ simple_fenced_bufmgr_create(struct pb_manager *provider,
    fenced_mgr->provider = provider;
    fenced_mgr->ops = ops;
 
-   LIST_INITHEAD(&fenced_mgr->fenced);
+   list_inithead(&fenced_mgr->fenced);
    fenced_mgr->num_fenced = 0;
 
-   LIST_INITHEAD(&fenced_mgr->unfenced);
+   list_inithead(&fenced_mgr->unfenced);
    fenced_mgr->num_unfenced = 0;
 
    (void) mtx_init(&fenced_mgr->mutex, mtx_plain);
index 061f588c86443f454b2a92a6553afa742b2be904..9f5c5dbbd0a68e48bf7aae74355492534b56345f 100644 (file)
@@ -215,7 +215,7 @@ vmw_fence_create(struct pb_fence_ops *fence_ops, uint32_t handle,
 
    if (vmw_fence_seq_is_signaled(seqno, ops->last_signaled, seqno)) {
       p_atomic_set(&fence->signalled, 1);
-      LIST_INITHEAD(&fence->ops_list);
+      list_inithead(&fence->ops_list);
    } else {
       p_atomic_set(&fence->signalled, 0);
       LIST_ADDTAIL(&fence->ops_list, &ops->not_signaled);
@@ -486,7 +486,7 @@ vmw_fence_ops_create(struct vmw_winsys_screen *vws)
       return NULL;
 
    (void) mtx_init(&ops->mutex, mtx_plain);
-   LIST_INITHEAD(&ops->not_signaled);
+   list_inithead(&ops->not_signaled);
    ops->base.destroy = &vmw_fence_ops_destroy;
    ops->base.fence_reference = &vmw_fence_ops_fence_reference;
    ops->base.fence_signalled = &vmw_fence_ops_fence_signalled;
index 8ec7b6b7920e327bc981847ba6945b610bf8ffc3..a022e202f681b1b23789f14f97f63dcc8592e0a2 100644 (file)
@@ -70,7 +70,7 @@ virgl_resource_cache_init(struct virgl_resource_cache *cache,
                           virgl_resource_cache_entry_release_func destroy_func,
                           void *user_data)
 {
-   LIST_INITHEAD(&cache->resources);
+   list_inithead(&cache->resources);
    cache->timeout_usecs = timeout_usecs;
    cache->entry_is_busy_func = is_busy_func;
    cache->entry_release_func = destroy_func;
index 82961b8b20b958750db053ca10fa1df3f13f4c79..83667994293aa3891a0aa11d7e42b1c45a3360b8 100644 (file)
@@ -805,11 +805,11 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe,
    st_init_driver_flags(st);
 
    /* Initialize context's winsys buffers list */
-   LIST_INITHEAD(&st->winsys_buffers);
+   list_inithead(&st->winsys_buffers);
 
-   LIST_INITHEAD(&st->zombie_sampler_views.list.node);
+   list_inithead(&st->zombie_sampler_views.list.node);
    simple_mtx_init(&st->zombie_sampler_views.mutex, mtx_plain);
-   LIST_INITHEAD(&st->zombie_shaders.list.node);
+   list_inithead(&st->zombie_shaders.list.node);
    simple_mtx_init(&st->zombie_shaders.mutex, mtx_plain);
 
    return st;
index 96e2f24695c221247686a3b3ffc7ddf727bc9805..8b160f51f0b0b3a32cbc4266a2f18986ece728c8 100644 (file)
@@ -158,7 +158,6 @@ static inline void list_validate(const struct list_head *list)
       assert(node->next->prev == node && node->prev->next == node);
 }
 
-#define LIST_INITHEAD(__item) list_inithead(__item)
 #define LIST_ADD(__item, __list) list_add(__item, __list)
 #define LIST_ADDTAIL(__item, __list) list_addtail(__item, __list)
 #define LIST_REPLACE(__from, __to) list_replace(__from, __to)
index 47b8dcd407c0f747be2486b699091a1be7aa0857..3a7fe4ab801a1174d9071e208ca1550b14215ad1 100644 (file)
@@ -67,7 +67,7 @@ atexit_handler(void)
 static void
 global_init(void)
 {
-   LIST_INITHEAD(&queue_list);
+   list_inithead(&queue_list);
    atexit(atexit_handler);
 }
 
index 96c33d4ead5b9fd98c775b7c27438be3ec15aaf9..2a3c63e69c91273f74ff72e9bd58d755c4691f6f 100644 (file)
@@ -368,7 +368,7 @@ static struct queue_data *new_queue_data(VkQueue queue,
    data->flags = family_props->queueFlags;
    data->timestamp_mask = (1ull << family_props->timestampValidBits) - 1;
    data->family_index = family_index;
-   LIST_INITHEAD(&data->running_command_buffer);
+   list_inithead(&data->running_command_buffer);
    map_object(HKEY(data->queue), data);
 
    /* Fence synchronizing access to queries on that queue. */