aboutsummaryrefslogtreecommitdiff
path: root/lib/base/thread.h
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2003-10-17 15:36:42 +0000
committerFelix Domke <tmbinc@elitedvb.net>2003-10-17 15:36:42 +0000
commitd63d2c3c6cbbd574dda4f8b00ebe6c661735edd5 (patch)
tree84d0cacfd0b6c1241c236c7860f7cbd7f26901bb /lib/base/thread.h
downloadenigma2-d63d2c3c6cbbd574dda4f8b00ebe6c661735edd5.tar.gz
enigma2-d63d2c3c6cbbd574dda4f8b00ebe6c661735edd5.zip
import of enigma2
Diffstat (limited to 'lib/base/thread.h')
-rw-r--r--lib/base/thread.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/base/thread.h b/lib/base/thread.h
new file mode 100644
index 00000000..56b74bed
--- /dev/null
+++ b/lib/base/thread.h
@@ -0,0 +1,23 @@
+#ifndef __lib_base_thread_h
+#define __lib_base_thread_h
+
+#include <pthread.h>
+
+class eThread
+{
+ pthread_t the_thread;
+ static void *wrapper(void *ptr);
+ int alive;
+public:
+ bool thread_running() { return alive; }
+ eThread();
+ virtual ~eThread();
+
+ void run();
+
+ virtual void thread()=0;
+
+ void kill();
+};
+
+#endif