diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2015-09-09 12:45:47 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2015-09-09 12:45:47 +0900 |
commit | 5625aac4d4860730428a0bca421f447425292aec (patch) | |
tree | 53049cbf421cea4b8f83b7b88f36729182b550d1 /m4 | |
parent | 712db856a2738505f245f2c0c98b3419993246de (diff) | |
download | efl-5625aac4d4860730428a0bca421f447425292aec.tar.gz |
eina thread - add wrapper for setting thread name and fix affinity
added support to set thread names for debugging. this wraps the gnu
extension to set a thread name of up to 15 chars (16 inc nul byte).
eina_thread_name_set() is the new api.
@feature
in the process i found the autofoo wasnt enabling cpu affinity support
at all in reality, so i had to fix that at the same time.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/efl_threads.m4 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/m4/efl_threads.m4 b/m4/efl_threads.m4 index 88317af8db..4ed9ff25a9 100644 --- a/m4/efl_threads.m4 +++ b/m4/efl_threads.m4 @@ -62,6 +62,17 @@ pthread_attr_setaffinity_np(NULL, 0, NULL); ]])], [efl_have_setaffinity="yes"], [efl_have_setaffinity="no"]) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[ +#define _GNU_SOURCE +#include <stdlib.h> +#include <pthread.h> + ]], + [[ +pthread_setname_np(NULL, NULL); + ]])], + [efl_have_setname="yes"], + [efl_have_setname="no"]) LIBS=${SAVE_LIBS} fi @@ -71,10 +82,14 @@ if test "x${_efl_have_posix_threads}" = "xyes" ; then else if test "x${_efl_have_win32_threads}" = "xyes" ; then efl_have_threads="Windows" + efl_have_pthread_affinity="no" efl_have_pthread_barrier="no" + efl_have_pthread_setname="no" else efl_have_threads="no" + efl_have_pthread_affinity="no" efl_have_pthread_barrier="no" + efl_have_pthread_setname="no" fi fi AC_MSG_RESULT([${efl_have_threads}]) |