summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcarlos <caiosignor@gmail.com>2020-04-30 15:11:40 -0300
committerFelipe Magno de Almeida <felipe@expertise.dev>2020-05-04 22:11:44 -0300
commit6d37a46e2bde996b2e053c25445f59f5d86490b8 (patch)
tree4ceb307e9eecf85e18418c8ca195762535adf9b8
parent019828797c7c715b606ed3bc6fdbfc1a58438ddd (diff)
eina_debug.c now use eina_threads functions instead of pthreads
-rw-r--r--src/lib/eina/eina_debug.c28
1 files changed, 3 insertions, 25 deletions
diff --git a/src/lib/eina/eina_debug.c b/src/lib/eina/eina_debug.c
index d8fe318ac2..378748852a 100644
--- a/src/lib/eina/eina_debug.c
+++ b/src/lib/eina/eina_debug.c
@@ -597,37 +597,15 @@ _monitor(void *_data)
597static void 597static void
598_thread_start(Eina_Debug_Session *session) 598_thread_start(Eina_Debug_Session *session)
599{ 599{
600#ifndef _WIN32 600 Eina_Thread monitor_thread;
601 pthread_t monitor_thread;
602 int err;
603 sigset_t oldset, newset;
604
605 sigemptyset(&newset);
606 sigaddset(&newset, SIGPIPE);
607 sigaddset(&newset, SIGALRM);
608 sigaddset(&newset, SIGCHLD);
609 sigaddset(&newset, SIGUSR1);
610 sigaddset(&newset, SIGUSR2);
611 sigaddset(&newset, SIGHUP);
612 sigaddset(&newset, SIGQUIT);
613 sigaddset(&newset, SIGINT);
614 sigaddset(&newset, SIGTERM);
615#ifdef SIGPWR
616 sigaddset(&newset, SIGPWR);
617#endif
618 pthread_sigmask(SIG_BLOCK, &newset, &oldset);
619 601
620 err = pthread_create(&monitor_thread, NULL, _monitor, session); 602 Eina_Bool err = eina_thread_create(&monitor_thread,EINA_THREAD_BACKGROUND,-1,(Eina_Thread_Cb)_monitor,session);
621 603
622 pthread_sigmask(SIG_SETMASK, &oldset, NULL); 604 if (!err)
623 if (err != 0)
624 { 605 {
625 e_debug("EINA DEBUG ERROR: Can't create monitor debug thread!"); 606 e_debug("EINA DEBUG ERROR: Can't create monitor debug thread!");
626 abort(); 607 abort();
627 } 608 }
628#else
629 (void)session;
630#endif
631} 609}
632 610
633/* 611/*