summaryrefslogtreecommitdiff
path: root/libc/src/reent.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/src/reent.c')
-rw-r--r--libc/src/reent.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/src/reent.c b/libc/src/reent.c
new file mode 100644
index 0000000..17de11d
--- /dev/null
+++ b/libc/src/reent.c
@@ -0,0 +1,8 @@
+#include "reent.h"
+
+static struct _reent main_thread;
+struct _reent * _impure_ptr = &main_thread;
+
+__attribute__((constructor)) static void init_main_thread() {
+ _REENT_INIT_PTR(_impure_ptr);
+}