summaryrefslogtreecommitdiff
path: root/src/threads/thrd_create.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/threads/thrd_create.c')
-rw-r--r--src/threads/thrd_create.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/threads/thrd_create.c b/src/threads/thrd_create.c
new file mode 100644
index 00000000..516c0c66
--- /dev/null
+++ b/src/threads/thrd_create.c
@@ -0,0 +1,8 @@
+#include <threads.h>
+#include <pthread.h>
+
+int thrd_create(thrd_t *thr, thrd_start_t func, void *arg)
+{
+ typedef void *(*pthread_start_fn)(void*);
+ return pthread_create(thr, 0, (pthread_start_fn)func, arg);
+}