From b52c93fdc2ff115d3d6a0d5aadb22c49d681974f Mon Sep 17 00:00:00 2001 From: Joakim Gebart Date: Tue, 4 Aug 2015 19:55:49 +0200 Subject: [PATCH] sys/newlib/syscalls.c: Add _getpid_r implementation --- sys/newlib/syscalls.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/newlib/syscalls.c b/sys/newlib/syscalls.c index 0f6a0d36f8..70fd9ba5bf 100644 --- a/sys/newlib/syscalls.c +++ b/sys/newlib/syscalls.c @@ -113,6 +113,17 @@ int _getpid(void) return sched_active_pid; } +/** + * @brief Get the process-ID of the current thread + * + * @return the process ID of the current thread + */ +pid_t _getpid_r(struct _reent *ptr) +{ + (void) ptr; + return sched_active_pid; +} + /** * @brief Send a signal to a given thread *