summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/getpid.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix/src/getpid.c')
-rw-r--r--cpukit/posix/src/getpid.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/cpukit/posix/src/getpid.c b/cpukit/posix/src/getpid.c
index b42981398a..8e912adf39 100644
--- a/cpukit/posix/src/getpid.c
+++ b/cpukit/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
+