forked from enlightenment/efl
eina/debug: replace some explicit pthread_t usage with Eina_Thread
no functional changes Differential Revision: https://phab.enlightenment.org/D6371
This commit is contained in:
parent
bea602f258
commit
3562878e21
|
@ -32,7 +32,7 @@ typedef struct _Eina_Debug_Thread Eina_Debug_Thread;
|
||||||
|
|
||||||
struct _Eina_Debug_Thread
|
struct _Eina_Debug_Thread
|
||||||
{
|
{
|
||||||
pthread_t thread;
|
Eina_Thread thread;
|
||||||
|
|
||||||
Eina_Debug_Session *cmd_session;
|
Eina_Debug_Session *cmd_session;
|
||||||
void *cmd_buffer;
|
void *cmd_buffer;
|
||||||
|
@ -47,7 +47,7 @@ struct _Eina_Debug_Thread
|
||||||
|
|
||||||
extern Eina_Spinlock _eina_debug_lock;
|
extern Eina_Spinlock _eina_debug_lock;
|
||||||
extern Eina_Spinlock _eina_debug_thread_lock;
|
extern Eina_Spinlock _eina_debug_thread_lock;
|
||||||
extern pthread_t _eina_debug_thread_mainloop;
|
extern Eina_Thread _eina_debug_thread_mainloop;
|
||||||
extern Eina_Debug_Thread *_eina_debug_thread_active;
|
extern Eina_Debug_Thread *_eina_debug_thread_active;
|
||||||
extern int _eina_debug_thread_active_num;
|
extern int _eina_debug_thread_active_num;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
// like get them to stop and dump a backtrace for us
|
// like get them to stop and dump a backtrace for us
|
||||||
Eina_Spinlock _eina_debug_thread_lock;
|
Eina_Spinlock _eina_debug_thread_lock;
|
||||||
|
|
||||||
pthread_t _eina_debug_thread_mainloop = 0;
|
Eina_Thread _eina_debug_thread_mainloop = 0;
|
||||||
Eina_Debug_Thread *_eina_debug_thread_active = NULL;
|
Eina_Debug_Thread *_eina_debug_thread_active = NULL;
|
||||||
int _eina_debug_thread_active_num = 0;
|
int _eina_debug_thread_active_num = 0;
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ static int _thread_id_counter = 1;
|
||||||
void
|
void
|
||||||
_eina_debug_thread_add(void *th)
|
_eina_debug_thread_add(void *th)
|
||||||
{
|
{
|
||||||
pthread_t *pth = th;
|
Eina_Thread *pth = th;
|
||||||
// take thread tracking lock
|
// take thread tracking lock
|
||||||
eina_spinlock_take(&_eina_debug_thread_lock);
|
eina_spinlock_take(&_eina_debug_thread_lock);
|
||||||
// if we don't have enough space to store thread id's - make some more
|
// if we don't have enough space to store thread id's - make some more
|
||||||
|
@ -74,7 +74,7 @@ _eina_debug_thread_add(void *th)
|
||||||
void
|
void
|
||||||
_eina_debug_thread_del(void *th)
|
_eina_debug_thread_del(void *th)
|
||||||
{
|
{
|
||||||
pthread_t *pth = th;
|
Eina_Thread *pth = th;
|
||||||
int i;
|
int i;
|
||||||
// take a thread tracking lock
|
// take a thread tracking lock
|
||||||
eina_spinlock_take(&_eina_debug_thread_lock);
|
eina_spinlock_take(&_eina_debug_thread_lock);
|
||||||
|
@ -99,7 +99,7 @@ _eina_debug_thread_del(void *th)
|
||||||
void
|
void
|
||||||
_eina_debug_thread_mainloop_set(void *th)
|
_eina_debug_thread_mainloop_set(void *th)
|
||||||
{
|
{
|
||||||
pthread_t *pth = th;
|
Eina_Thread *pth = th;
|
||||||
_eina_debug_thread_mainloop = *pth;
|
_eina_debug_thread_mainloop = *pth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue