summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcarlos <caiosignor@gmail.com>2020-04-17 17:22:11 -0300
committerJoão Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>2020-04-29 12:13:38 -0300
commit5c89d47bdc626abc6c7a2d15eadfad35bcb257d6 (patch)
tree22e27fcf623e0103b36c24078387e1d9eadec1ea
parent3c097956075d942301a51c45c6c053de7d440b18 (diff)
EINA_HAVE_PTHREAD_SETNAME to EINA_HAVE_THREAD_SETNAME
-rw-r--r--src/lib/eina/eina_debug.c4
-rw-r--r--src/lib/eina/eina_debug_timer.c2
-rw-r--r--src/lib/eina/eina_thread.c4
-rw-r--r--src/lib/eina/eina_thread_posix.h2
-rw-r--r--src/lib/eina/meson.build2
5 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/eina/eina_debug.c b/src/lib/eina/eina_debug.c
index e4292ecbb2..eab73388b0 100644
--- a/src/lib/eina/eina_debug.c
+++ b/src/lib/eina/eina_debug.c
@@ -73,7 +73,7 @@
73#include "eina_vpath.h" 73#include "eina_vpath.h"
74#include "eina_internal.h" 74#include "eina_internal.h"
75 75
76#ifdef EINA_HAVE_PTHREAD_SETNAME 76#ifdef EINA_HAVE_THREAD_SETNAME
77# ifndef __linux__ 77# ifndef __linux__
78# include <pthread_np.h> 78# include <pthread_np.h>
79# endif 79# endif
@@ -555,7 +555,7 @@ _monitor(void *_data)
555 _opcodes_register_all(session); 555 _opcodes_register_all(session);
556 556
557 // set a name for this thread for system debugging 557 // set a name for this thread for system debugging
558#ifdef EINA_HAVE_PTHREAD_SETNAME 558#ifdef EINA_HAVE_THREAD_SETNAME
559 eina_thread_name_set(eina_thread_self(), "Edbg-mon"); 559 eina_thread_name_set(eina_thread_self(), "Edbg-mon");
560#endif 560#endif
561 561
diff --git a/src/lib/eina/eina_debug_timer.c b/src/lib/eina/eina_debug_timer.c
index 218f883e60..2e7e5ce13e 100644
--- a/src/lib/eina/eina_debug_timer.c
+++ b/src/lib/eina/eina_debug_timer.c
@@ -94,7 +94,7 @@ _monitor(void *_data EINA_UNUSED)
94 event.events = EPOLLIN; 94 event.events = EPOLLIN;
95 ret = epoll_ctl(epfd, EPOLL_CTL_ADD, event.data.fd, &event); 95 ret = epoll_ctl(epfd, EPOLL_CTL_ADD, event.data.fd, &event);
96 if (ret) perror("epoll_ctl/add"); 96 if (ret) perror("epoll_ctl/add");
97# ifdef EINA_HAVE_PTHREAD_SETNAME 97# ifdef EINA_HAVE_THREAD_SETNAME
98 eina_thread_name_set(eina_thread_self(), "Edbg-tim"); 98 eina_thread_name_set(eina_thread_self(), "Edbg-tim");
99# endif 99# endif
100 100
diff --git a/src/lib/eina/eina_thread.c b/src/lib/eina/eina_thread.c
index 7300c5524b..2d9199ed08 100644
--- a/src/lib/eina/eina_thread.c
+++ b/src/lib/eina/eina_thread.c
@@ -41,7 +41,7 @@
41#endif 41#endif
42# include <string.h> 42# include <string.h>
43 43
44#if defined(EINA_HAVE_PTHREAD_AFFINITY) || defined(EINA_HAVE_PTHREAD_SETNAME) 44#if defined(EINA_HAVE_PTHREAD_AFFINITY) || defined(EINA_HAVE_THREAD_SETNAME)
45# define cpu_set_t cpuset_t 45# define cpu_set_t cpuset_t
46#endif 46#endif
47 47
@@ -115,7 +115,7 @@ eina_thread_join(Eina_Thread t)
115EAPI Eina_Bool 115EAPI Eina_Bool
116eina_thread_name_set(Eina_Thread t, const char *name) 116eina_thread_name_set(Eina_Thread t, const char *name)
117{ 117{
118#ifdef EINA_HAVE_PTHREAD_SETNAME 118#ifdef EINA_HAVE_THREAD_SETNAME
119 char buf[16]; 119 char buf[16];
120 if (name) 120 if (name)
121 { 121 {
diff --git a/src/lib/eina/eina_thread_posix.h b/src/lib/eina/eina_thread_posix.h
index 470e5a359f..d198e12f1e 100644
--- a/src/lib/eina/eina_thread_posix.h
+++ b/src/lib/eina/eina_thread_posix.h
@@ -34,7 +34,7 @@
34#define EINA_THREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS 34#define EINA_THREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS
35#define EINA_THREAD_CANCELED PTHREAD_CANCELED 35#define EINA_THREAD_CANCELED PTHREAD_CANCELED
36 36
37#if defined(EINA_HAVE_PTHREAD_AFFINITY) || defined(EINA_HAVE_PTHREAD_SETNAME) 37#if defined(EINA_HAVE_PTHREAD_AFFINITY) || defined(EINA_HAVE_THREAD_SETNAME)
38# ifndef __linux__ 38# ifndef __linux__
39# include <pthread_np.h> 39# include <pthread_np.h>
40# define cpu_set_t cpuset_t 40# define cpu_set_t cpuset_t
diff --git a/src/lib/eina/meson.build b/src/lib/eina/meson.build
index 4dbf1342bd..71eda3d95c 100644
--- a/src/lib/eina/meson.build
+++ b/src/lib/eina/meson.build
@@ -304,7 +304,7 @@ else
304endif 304endif
305 305
306if cc.has_header_symbol(pthread_np_header_file, pthread_setname_np_api, args : pthread_args) 306if cc.has_header_symbol(pthread_np_header_file, pthread_setname_np_api, args : pthread_args)
307 eina_config.set('EINA_HAVE_PTHREAD_SETNAME', '1') 307 eina_config.set('EINA_HAVE_THREAD_SETNAME', '1')
308endif 308endif
309 309
310if cc.has_header_symbol(pthread_np_header_file, 'pthread_attr_setaffinity_np', args : pthread_args) 310if cc.has_header_symbol(pthread_np_header_file, 'pthread_attr_setaffinity_np', args : pthread_args)