merge some code with enigma code
[vuplus_dvbapp] / lib / base / thread.h
index 80c8d92..f713005 100644 (file)
@@ -2,23 +2,26 @@
 #define __lib_base_thread_h
 
 #include <pthread.h>
+#include <signal.h>
 
 class eThread
 {
        pthread_t the_thread;
        static void *wrapper(void *ptr);
        int alive;
+       static void thread_completed(void *p);
 public:
        bool thread_running() { return alive; }
        eThread();
        virtual ~eThread();
        
-       void run();
+       void run(int prio=0,int policy=0);
 
        virtual void thread()=0;
-       
+       virtual void thread_finished() { }
+
        void sendSignal(int sig);
-       void kill();
+       void kill(bool hard=false);
 };
 
 #endif