mesa/src/util
Thierry Reding 498faea103 disk cache: Link with -latomic if necessary
The disk cache implementation uses 64-bit atomic operations. For some
architectures, such as 32-bit ARM, GCC will not be able to translate
these operations into atomic, lock-free instructions and will instead
rely on the external atomics library to provide these operations.

Check at configuration time whether or not linking against libatomic
is necessary and if so, create a dependency that can be used while
linking the mesautil library.

This is the meson equivalent of 2ef7f23820 ("configure: check if
-latomic is needed for __atomic_*").

For some background information on this, see:

	https://gcc.gnu.org/wiki/Atomic/GCCMM

Changes in v2:
- clarify meaning of lock-free in commit message
- fix build if -latomic is not necessary

Acked-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-03-02 11:31:59 +01:00
..
sha1 util: Fix SHA1 implementation on big endian 2017-11-25 12:30:46 -08:00
tests autotools: include meson build files in tarball 2018-01-19 16:30:51 -08:00
xmlpool autotools: include meson build files in tarball 2018-01-19 16:30:51 -08:00
.gitignore mesa: Add .gitignore entries for make check binaries 2016-05-25 09:41:44 -07:00
Android.mk Android: util: fix locale generation in options.h 2018-01-03 09:49:08 -06:00
bitscan.c util/bitscan: use correct signature for ffs/ffsll 2017-03-13 11:16:34 +00:00
bitscan.h gallium: use "ull" number suffix to keep the QtCreator parser happy 2017-07-10 22:44:48 +02:00
bitset.h util/bitset: Make C++ wrapper trivially constructible. 2018-02-27 11:38:18 -08:00
build_id.c util/build-id: Fix address comparison for binaries with LOAD vaddr > 0 2018-02-05 14:26:33 +00:00
build_id.h util: Query build-id by symbol address, not library name 2017-09-13 09:49:27 -07:00
crc32.c util: use faster zlib's CRC32 implementaion 2018-01-14 19:10:33 +02:00
crc32.h util: import CRC32 implementation from gallium 2016-11-22 18:05:51 +01:00
debug.c util: move brw_env_var_as_boolean() to util 2015-11-24 10:02:55 -05:00
debug.h util: rename include guard to avoid clash 2017-09-07 08:54:44 +01:00
disk_cache.c disk cache: move path creation back to constructor 2018-02-09 11:33:25 +02:00
disk_cache.h disk cache: add callback functionality 2018-02-07 14:45:34 +02:00
drirc drirc: set allow_glsl_cross_stage_interpolation_mismatch for more games 2017-12-20 09:43:42 +02:00
format_r11g11b10f.h util: consistently use ifndef guards over pragma once 2017-03-22 16:55:22 +00:00
format_rgb9e5.h util/format: Use explicitly sized types 2016-08-05 09:07:04 -07:00
format_srgb.h util: Tiny optimisation for the linear→srgb conversion 2015-11-27 10:55:22 +01:00
format_srgb.py util: remove shebang from format_srgb.py 2017-03-10 14:12:48 +00:00
futex.h util/u_queue: add util_queue_fence_wait_timeout 2017-11-09 13:58:10 +01:00
half_float.c glsl: move half<->float convertion to util 2015-10-16 19:33:37 -04:00
half_float.h mesa: move _mesa_half_is_negative() to half_float.h 2017-10-10 11:28:31 -06:00
hash_table.c util: hashtable: make hashing prototypes match 2017-10-30 15:18:00 +00:00
hash_table.h util: hashtable: make hashing prototypes match 2017-10-30 15:18:00 +00:00
list.h util: #include "c99_compat.h" to fix Windows build 2017-04-03 13:09:05 -06:00
macros.h util: Add EXPLICIT_CONVERSION macro. 2018-02-24 15:28:36 -08:00
Makefile.am autotools: include meson build files in tarball 2018-01-19 16:30:51 -08:00
Makefile.sources util: move os_time.[ch] to src/util 2017-11-09 11:57:21 +01:00
merge_driinfo.py util: add merge_driinfo.py 2017-08-02 09:50:57 +02:00
mesa-sha1.c util/sha1: harmonize _mesa_sha1_* wrappers 2017-03-22 11:33:51 +00:00
mesa-sha1.h util: #include "c99_compat.h" to fix Windows build 2017-04-03 13:09:05 -06:00
mesa-sha1_test.c util: Add a SHA1 unit test program 2017-11-25 12:30:46 -08:00
meson.build disk cache: Link with -latomic if necessary 2018-03-02 11:31:59 +01:00
os_time.c util: use clock_gettime() on PIPE_OS_BSD 2018-03-01 18:44:38 +00:00
os_time.h util: move os_time.[ch] to src/util 2017-11-09 11:57:21 +01:00
ralloc.c ralloc: Allow reparenting to a NULL context 2017-10-12 22:39:31 -07:00
ralloc.h util/ralloc: add ralloc_str_append() helper 2017-08-11 10:43:31 +10:00
rand_xor.c util/rand_xor: add missing include statements 2017-06-01 14:26:12 +01:00
rand_xor.h util/rand_xor: add function to seed rand 2017-03-23 08:16:29 +11:00
register_allocate.c util/ra: fix memory leak 2017-07-31 12:55:19 -07:00
register_allocate.h ra: Add a callback for selecting a register from what's available. 2017-07-25 14:44:52 -07:00
rgtc.c util: move shared rgtc code to util (v2) 2014-09-17 11:27:25 +10:00
rgtc.h util: move shared rgtc code to util (v2) 2014-09-17 11:27:25 +10:00
roundeven_test.c util: Add a roundeven test. 2015-03-18 21:06:26 -07:00
rounding.h util: try to use SSE instructions with MSVC and 32-bit gcc 2016-08-17 12:53:20 -06:00
SConscript util: scons: wire up the sha1 test 2017-12-15 19:01:12 +00:00
set.c util: make set's deleted_key_value declaration consistent with hash table one 2017-06-08 09:26:44 +02:00
set.h util/hash_set: Rework the API to know about hashing 2015-01-15 13:21:27 -08:00
simple_list.h mesa: Port a variant of 68afbe89c7 to util/ 2015-01-28 16:33:34 -08:00
simple_mtx.h src/util/simple_mtx.h: Fix two -Wunused-param warnings. 2017-11-17 09:27:57 -07:00
slab.c util: slab_destroy_child should check whether it's been initialized 2017-05-29 01:52:16 +02:00
slab.h util/slab: re-design to allow migration between pools (v3) 2016-10-05 15:40:40 +02:00
string_buffer.c util: Add a string buffer implementation 2017-09-26 18:24:33 +02:00
string_buffer.h util: Add a string buffer implementation 2017-09-26 18:24:33 +02:00
strndup.h util/strndup: move header inclusion as applicable 2017-03-22 16:55:23 +00:00
strtod.c util: improve compiler guard 2017-09-03 09:05:23 +01:00
strtod.h mesa/main: free locale at exit 2015-06-29 09:06:40 -07:00
texcompress_rgtc_tmp.h util: move shared rgtc code to util (v2) 2014-09-17 11:27:25 +10:00
u_atomic.c util/u_atomic: remove unnecessaty __atomic functions 2017-09-22 17:12:24 +03:00
u_atomic.h util/u_atomic: add p_atomic_xchg 2017-11-09 11:37:30 +01:00
u_atomic_test.c util: fix comment typo 2015-12-04 14:06:41 +00:00
u_dynarray.h util: include string.h in u_dynarray.h 2018-01-17 11:17:56 -07:00
u_endian.h util: Also include endian.h on cygwin 2017-11-29 14:04:40 +00:00
u_queue.c util/u_queue: fix timeout handling in util_queue_fence_wait_timeout 2017-11-20 18:15:49 +01:00
u_queue.h util/u_queue: really use futex-based fences 2017-11-20 18:15:53 +01:00
u_string.h util: add util_strdup() wrapper macro 2017-10-23 15:10:24 -06:00
u_thread.h u_thread: Use pthread_setname_np on linux only. 2018-01-22 21:12:41 +00:00
u_vector.c anv: Move a comment that got left behind in the u_vector refactor. 2017-08-18 11:56:58 -07:00
u_vector.h util: Remove u_math from u_vector 2017-07-14 14:14:05 +01:00
xmlconfig.c xmlconfig: use the portable __VA_ARGS__ 2017-08-26 11:20:06 +01:00
xmlconfig.h xmlconfig: move into src/util 2017-07-31 15:38:41 +02:00
xmlpool.h xmlconfig: move into src/util 2017-07-31 15:38:41 +02:00