summaryrefslogtreecommitdiffstats
path: root/src/util/u_thread.h
Commit message (Collapse)AuthorAgeFilesLines
* move pthread_setaffinity_np check to the build systemDylan Baker2018-09-171-4/+0
| | | | | | | | | | | | | | | | | Rather than trying to encode all of the rules in a header, lets just put them in the build system where they belong. This fixes the build on FreeBSD, which does have pthraed_setaffinity_np, but it's in a pthread_np.h, not behind _GNU_SOURCE. FreeBSD also implements cpu_set slightly differently, so additional changes would be required to get it working right there anyway. v2: - fix #define in autotools Fixes: 9f1bbbdbbd77d346c74c7abbb31f399151a85713 ("util: try to fix the Android and MacOS build") Cc: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* util: try to fix the Android and MacOS buildMarek Olšák2018-09-101-2/+5
| | | | | | | | Bionic does not have pthread_setaffinity_np. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107869 Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* st/mesa: pin driver threads to a specific L3 cache on AMD Zen (v2)Marek Olšák2018-09-071-0/+57
| | | | | | v2: use set_context_param Reviewed-by: Brian Paul <[email protected]>
* u_thread: Use pthread_setname_np on linux only.Samuel Thibault2018-01-221-1/+2
| | | | | | | pthread_setname_np was added in glibc 2.12 for the Linux port only, other ports do not necessarily have it. Signed-off-by: Jose Fonseca <[email protected]>
* util/u_thread: fix compilation on Mac OSNicolai Hähnle2017-11-101-1/+1
| | | | | | | | | | | | Apparently, it doesn't have pthread barriers. p_config.h (which was originally used to guard this code) uses the __APPLE__ macro to detect Mac OS. Fixes: f0d3a4de75 ("util: move pipe_barrier into src/util and rename to util_barrier") Cc: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* util: move pipe_barrier into src/util and rename to util_barrierNicolai Hähnle2017-11-091-0/+74
| | | | | | | | | The #if guard is probably not 100% equivalent to the previous PIPE_OS check, but if anything it should be an over-approximation (are there pthread implementations without barriers?), so people will get either a good implementation or compile errors that are easy to fix. Reviewed-by: Marek Olšák <[email protected]>
* util: move pipe_thread_is_self from gallium to src/utilMarek Olšák2017-06-261-0/+12
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* util/u_thread.h: Include stdint.h for int64_t definition.Jose Fonseca2017-03-131-0/+2
| | | | Fixes MinGW build. Trivial.
* util: add u_thread.hTimothy Arceri2017-03-121-0/+89
This is a minimal copy of os_thread.h from gallium in order to move u_queue.{c,h} to this directory. Reviewed-by: Marek Olšák <[email protected]>