Yonggang Luo
cdad035cfd
util: Add function debug_get_option_cached os_get_option_cached
...
This is used to fixes DEBUG_GET_ONCE_*_OPTION macros latter
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19554 >
2022-12-16 19:30:19 +00:00
Yonggang Luo
397a5c1b2e
util: Improve os_get_android_option to be thread-safe
...
struct hash_table is not thread-safety, need guard by mutex,
but with thread local storage, we can simplify the code and also
got the thread safety without the need of mutex.
Another advantage is by using thread local storage, os_get_android_option
will have the same actions like getenv does, that it's not cached the
value, each call will access the property_get, like getenv will be affected
by putenv
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19554 >
2022-12-16 19:30:19 +00:00
Yonggang Luo
557120b593
util: Include the needed util/detect*.h headers in multiple files
...
This is discovered either by manually or -W-no-def option
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/19674 >
2022-11-15 20:35:55 +00:00
Yonggang Luo
80fac8637b
tree-wide: Convert all usage of defined(PIPE_(OS|ARCH|CC)_*) to DETECT_(OS|ARCH|CC)_* by use grep
...
From:
defined[\s]*\([\s]*PIPE_(OS|ARCH|CC)_([0-9A-Z_]+)[\s]*\)
To:
DETECT_$1_$2
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/19674 >
2022-11-15 20:35:55 +00:00
Yonggang Luo
ea7cda93f3
misc: replace #ifdef\s\s__cplusplus with #ifdef\s__cplusplus
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15762 >
2022-04-21 14:43:39 +00:00
Yonggang Luo
9aa094d1b1
misc: Replace #ifdef\t__cplusplus with #ifdef\s\s__cplusplus
...
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15762 >
2022-04-21 14:43:39 +00:00
Jesse Natalie
cdf3a6a83b
util: Add os_get_page_size query
...
No Apple/BSD implementation yet, I have no idea how to do that
Reviewed-by: Francisco Jerez <currojerez@riseup.net >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7680 >
2020-12-02 10:12:27 -08:00
Vinson Lee
fdb1997ab5
Fix VMware capitalization.
...
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Brian Paul <brianp@vmware.com >
Reviewed-by: Neha Bhende <bhenden@vmware.com >
Reviewed-by: Jose Fonseca <jfonseca@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7260 >
2020-10-27 15:33:40 -07:00
Jonathan Gray
033dcb2978
util/os_misc: add os_get_available_system_memory()
...
Add os_get_available_system_memory() derived from
src/intel/vulkan/anv_device.c get_available_system_memory()
Fixes: b80930a6fe ("anv: add support for VK_EXT_memory_budget")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6517 >
2020-09-02 12:14:56 +10:00
Lionel Landwerlin
85bf1dc2de
util: os_misc: drop p_compiler.h include
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Eric Engestrom <eric.engestrom@intel.com >
2019-08-09 22:59:43 +03:00
Eric Engestrom
7f12a66ad5
util/os_misc: use detect_os.h to start uncoupling from gallium
...
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com >
Reviewed-by: Matt Turner <mattst88@gmail.com >
2019-08-02 18:38:52 +01:00
Dylan Baker
2fd5dff7e7
util: Move os_misc to util
...
this is needed by u_debug
Tested-by: Brian Paul <brianp@vmware.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
2018-10-30 14:32:52 -07:00