summaryrefslogtreecommitdiff
path: root/src/thread.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-08-13 19:31:39 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2015-08-13 19:31:39 +0200
commit36faa43c90023297377d56662d310743d93b938f (patch)
treed2a5a6ad434139055af1ad4914cbca5065fe8309 /src/thread.h
parenta611e1e4dad81cde86165844b4cd078799f3f10d (diff)
Clean up thread code.
Diffstat (limited to 'src/thread.h')
-rw-r--r--src/thread.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/thread.h b/src/thread.h
index 837222a..f2c1dd0 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -24,10 +24,10 @@
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#ifndef __DRUMGIZMO_THREAD_H__
-#define __DRUMGIZMO_THREAD_H__
+#pragma once
#ifdef WIN32
+#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#else
#include <pthread.h>
@@ -41,14 +41,16 @@ public:
void run();
void wait_stop();
+protected:
virtual void thread_main() = 0;
private:
#ifdef WIN32
HANDLE tid;
+ static DWORD WINAPI
#else
pthread_t tid;
+ static void*
#endif/*WIN32*/
+ thread_run(void *data);
};
-
-#endif/*__DRUMGIZMO_THREAD_H__*/