From: Felix Domke Date: Sat, 30 Apr 2005 17:58:18 +0000 (+0000) Subject: - add sendSignal to eThread X-Git-Tag: 2.6.0~5888 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/110c675aaad3ed8798ebf927652ae04511d31cb8?hp=6d4050444c2055fdc207a860dc4cf46580431b55 - add sendSignal to eThread --- diff --git a/lib/base/thread.cpp b/lib/base/thread.cpp index 4cff9259..b75378b8 100644 --- a/lib/base/thread.cpp +++ b/lib/base/thread.cpp @@ -32,3 +32,9 @@ void eThread::kill() pthread_join(the_thread, 0); eDebug("ok"); } + +void eThread::sendSignal(int sig) +{ + if (alive) + pthread_kill(the_thread, sig); +} diff --git a/lib/base/thread.h b/lib/base/thread.h index 56b74bed..80c8d92a 100644 --- a/lib/base/thread.h +++ b/lib/base/thread.h @@ -17,6 +17,7 @@ public: virtual void thread()=0; + void sendSignal(int sig); void kill(); };