util/c11: Update function u_thread_create to be c11 conformance
authorYonggang Luo <luoyonggang@gmail.com>
Tue, 14 Jun 2022 06:00:57 +0000 (14:00 +0800)
committerMarge Bot <emma+marge@anholt.net>
Wed, 15 Jun 2022 17:37:17 +0000 (17:37 +0000)
commita9e2c699aa3677e24a58de10c5e68ecb950f4a94
tree976e928e718a458ae82c86da33069d858fa838eb
parent6e33ef2bb9d096bdac40678e5cf5dda3e98fef7b
util/c11: Update function u_thread_create to be c11 conformance

Do not assume thrd_t to be a pointer or integer, as the C11 standard tells us:
  thrd_t: implementation-defined complete object type identifying a thread
At https://en.cppreference.com/w/c/thread
So we always return the thread creation return code instead of thrd_t value, and judge the return
code properly.

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/15087>
12 files changed:
src/gallium/auxiliary/driver_ddebug/dd_context.c
src/gallium/auxiliary/driver_rbug/rbug_core.c
src/gallium/drivers/llvmpipe/lp_cs_tpool.c
src/gallium/drivers/llvmpipe/lp_rast.c
src/gallium/drivers/r600/r600_gpu_load.c
src/gallium/drivers/r600/r600_pipe_common.h
src/gallium/drivers/radeonsi/si_gpu_load.c
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/frontends/nine/nine_state.c
src/gallium/tests/unit/pipe_barrier_test.c
src/util/u_queue.c
src/util/u_thread.h