X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fbase%2Fthread.cpp;h=9878856eaa483007ccaa7d92f42043645c49a835;hb=a50379ad64b3f0b79af40876ebde0e6deb15d245;hp=8dded28ab9de8dc4474bd9c11ba60c452534153b;hpb=e82ff190baa45424879466594255109d98aceee0;p=vuplus_dvbapp diff --git a/lib/base/thread.cpp b/lib/base/thread.cpp index 8dded28..9878856 100644 --- a/lib/base/thread.cpp +++ b/lib/base/thread.cpp @@ -2,6 +2,7 @@ #include #include +#include #include void eThread::thread_completed(void *ptr) @@ -95,12 +96,13 @@ int eThread::sync(void) return res; /* 0: thread is guaranteed not to run. 1: state unknown. */ } -void eThread::sendSignal(int sig) +int eThread::sendSignal(int sig) { if (m_alive) - pthread_kill(the_thread, sig); + return pthread_kill(the_thread, sig); else eDebug("send signal to non running thread"); + return -1; } void eThread::kill(bool sendcancel)