forked from enlightenment/efl
eina_debug_timer code convention
This commit is contained in:
parent
1b3f60780e
commit
4cee97de7e
|
@ -162,7 +162,6 @@ eina_debug_timer_add(unsigned int timeout_ms, Eina_Debug_Timer_Cb cb, void *data
|
|||
{
|
||||
#ifndef _WIN32
|
||||
sigset_t oldset, newset;
|
||||
|
||||
sigemptyset(&newset);
|
||||
sigaddset(&newset, SIGPIPE);
|
||||
sigaddset(&newset, SIGALRM);
|
||||
|
@ -178,11 +177,11 @@ eina_debug_timer_add(unsigned int timeout_ms, Eina_Debug_Timer_Cb cb, void *data
|
|||
# endif
|
||||
pthread_sigmask(SIG_BLOCK, &newset, &oldset);
|
||||
#endif
|
||||
int err = pthread_create(&_thread, NULL, _monitor, NULL);
|
||||
int err = eina_thread_create(&_thread, NULL, _monitor, NULL);
|
||||
#ifndef _WIN32
|
||||
pthread_sigmask(SIG_SETMASK, &oldset, NULL);
|
||||
#endif
|
||||
if (err != 0)
|
||||
if (!err)
|
||||
{
|
||||
e_debug("EINA DEBUG ERROR: Can't create debug timer thread!");
|
||||
abort();
|
||||
|
@ -211,8 +210,7 @@ _eina_debug_timer_init(void)
|
|||
{
|
||||
eina_spinlock_new(&_lock);
|
||||
#ifndef _WIN32
|
||||
if (pipe(pipeToThread) == -1)
|
||||
return EINA_FALSE;
|
||||
if (pipe(pipeToThread) == -1) return EINA_FALSE;
|
||||
#endif
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
@ -227,8 +225,7 @@ _eina_debug_timer_shutdown(void)
|
|||
free(t);
|
||||
close(pipeToThread[0]);
|
||||
close(pipeToThread[1]);
|
||||
if (_thread_runs)
|
||||
eina_thread_cancel(_thread);
|
||||
if (_thread_runs) eina_thread_cancel(_thread);
|
||||
_thread_runs = 0;
|
||||
eina_spinlock_release(&_lock);
|
||||
eina_spinlock_free(&_lock);
|
||||
|
|
Loading…
Reference in New Issue