summaryrefslogtreecommitdiffstats
path: root/newlib/libc/sys/linux/linuxthreads/getreent.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/sys/linux/linuxthreads/getreent.c')
-rw-r--r--newlib/libc/sys/linux/linuxthreads/getreent.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/newlib/libc/sys/linux/linuxthreads/getreent.c b/newlib/libc/sys/linux/linuxthreads/getreent.c
new file mode 100644
index 000000000..e73c4a531
--- /dev/null
+++ b/newlib/libc/sys/linux/linuxthreads/getreent.c
@@ -0,0 +1,11 @@
+/* get thread-specific reentrant pointer */
+
+#include <internals.h>
+
+struct _reent *
+__getreent (void)
+{
+ pthread_descr self = thread_self();
+ return THREAD_GETMEM(self, p_reentp);
+}
+