summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/libpthread/pthread_exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/dietlibc/libpthread/pthread_exit.c')
-rw-r--r--mdk-stage1/dietlibc/libpthread/pthread_exit.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/mdk-stage1/dietlibc/libpthread/pthread_exit.c b/mdk-stage1/dietlibc/libpthread/pthread_exit.c
new file mode 100644
index 000000000..41eac0a33
--- /dev/null
+++ b/mdk-stage1/dietlibc/libpthread/pthread_exit.c
@@ -0,0 +1,17 @@
+#include <unistd.h>
+#include <errno.h>
+
+#include <pthread.h>
+#include "thread_internal.h"
+
+void pthread_exit(void *retval)
+{
+ _pthread_descr this;
+
+ __THREAD_INIT();
+
+ this = __thread_self();
+ this->retval = retval;
+
+ longjmp(this->jmp_exit,1);
+}