summaryrefslogtreecommitdiffstats
path: root/c/src/exec/posix/src/getpid.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c/src/exec/posix/src/getpid.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/c/src/exec/posix/src/getpid.c b/c/src/exec/posix/src/getpid.c
index b42981398a..8e912adf39 100644
--- a/c/src/exec/posix/src/getpid.c
+++ b/c/src/exec/posix/src/getpid.c
@@ -20,3 +20,22 @@ pid_t getpid( void )
{
return _Objects_Local_node;
}
+
+/*
+ * _getpid_r
+ *
+ * This is the Newlib dependent reentrant version of getpid().
+ */
+
+#if defined(RTEMS_NEWLIB)
+
+#include <reent.h>
+
+pid_t _getpid_r(
+ struct _reent *ptr
+)
+{
+ return getpid();
+}
+#endif
+