c11: Update the values of enum mtx_plain, mtx_recursive, mtx_timed to make sure mtx_r...
authorYonggang Luo <luoyonggang@gmail.com>
Tue, 6 Sep 2022 15:59:50 +0000 (23:59 +0800)
committerMarge Bot <emma+marge@anholt.net>
Wed, 14 Sep 2022 02:46:51 +0000 (02:46 +0000)
commiteec1e728c5cde99e8cd61a49791dfd96e383a902
tree770f18c632c43ac8a8232dc4ae78211ccb4ae6bb
parent0894762cb872413bfab4bf121cef16e4139589ae
c11: Update the values of enum mtx_plain, mtx_recursive, mtx_timed to make sure mtx_recursive != mtx_plain | mtx_recursive

According to c11 standards, there is 4 variant of mtx_init parameter,
mtx_plain
mtx_timed
mtx_plain|mtx_recursive
mtx_timed|mtx_recursive

Directly use mtx_recursive is not a thing, so we need make sure mtx_plain and mtx_plain|mtx_recursive are not equal,
So now we choose the values from Android c11 threads.h for enum mtx_plain, mtx_recursive, mtx_timed, to make sure
c11/threads.h be more c11 conformance, and can raise error when the type parameter of mtx_init are not one of
mtx_plain
mtx_timed
mtx_plain|mtx_recursive
mtx_timed|mtx_recursive

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/18445>
src/c11/threads.h