]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/unix/thread.cpp
Move most platform-specific code into overlay directories
[libs/core.git] / source / core / unix / thread.cpp
diff --git a/source/core/unix/thread.cpp b/source/core/unix/thread.cpp
new file mode 100644 (file)
index 0000000..e7d7f58
--- /dev/null
@@ -0,0 +1,25 @@
+#include <pthread.h>
+#include <signal.h>
+#include "thread.h"
+#include "thread_private.h"
+
+using namespace std;
+
+namespace Msp {
+
+void Thread::platform_join()
+{
+       pthread_join(priv_->handle, 0);
+}
+
+void Thread::platform_kill()
+{
+       pthread_kill(priv_->handle, SIGKILL);
+}
+
+void Thread::platform_launch()
+{
+       pthread_create(&priv_->handle, 0, &Private::main_wrapper, this);
+}
+
+} // namespace Msp