mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 05:48:07 +02:00
util: Use literal instead call to list_inithead in u_queue.c
This is a more convenient way to struct list_head variable. And removed the need to call list_inithead in global_init Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18092>
This commit is contained in:
parent
ddd74bec38
commit
f9d7308014
1 changed files with 4 additions and 2 deletions
|
|
@ -55,7 +55,10 @@ util_queue_kill_threads(struct util_queue *queue, unsigned keep_num_threads,
|
|||
*/
|
||||
|
||||
static once_flag atexit_once_flag = ONCE_FLAG_INIT;
|
||||
static struct list_head queue_list;
|
||||
static struct list_head queue_list = {
|
||||
.next = &queue_list,
|
||||
.prev = &queue_list,
|
||||
};
|
||||
static mtx_t exit_mutex = _MTX_INITIALIZER_NP;
|
||||
|
||||
static void
|
||||
|
|
@ -74,7 +77,6 @@ atexit_handler(void)
|
|||
static void
|
||||
global_init(void)
|
||||
{
|
||||
list_inithead(&queue_list);
|
||||
atexit(atexit_handler);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue