util: Add a Win32 futex impl

This uses APIs that are not available on Win7. Since this is a build-time
configuration, and since we can't use the SDK version as an indicator
(since you can support Win7 via new SDKs), a new option is added to allow
disabling it, to maintain Win7 support if desired.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17431>
This commit is contained in:
Jesse Natalie
2022-07-08 11:16:44 -07:00
committed by Marge Bot
parent 62f79f9ec1
commit c002bbeb2f
4 changed files with 58 additions and 2 deletions

View File

@@ -1617,6 +1617,15 @@ if with_platform_haiku
dep_network = cc.find_library('network')
endif
dep_futex = null_dep
if host_machine.system() == 'windows'
if (get_option('min-windows-version') < 8)
dep_futex = declare_dependency(compile_args : ['-DWINDOWS_NO_FUTEX'])
else
dep_futex = cc.find_library('synchronization', required : true)
endif
endif
# Check for libdrm. Various drivers have different libdrm version requirements,
# but we always want to use the same version for all libdrm modules. That means
# even if driver foo requires 2.4.0 and driver bar requires 2.4.3, if foo and