This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Add pthread_setname_np() and pthread_getname_np()


The pthread_setname_np() and pthread_getname_np() are GNU extensions and
provided by glibc.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
---
 newlib/libc/include/pthread.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/newlib/libc/include/pthread.h b/newlib/libc/include/pthread.h
index 46f5420..516131d 100644
--- a/newlib/libc/include/pthread.h
+++ b/newlib/libc/include/pthread.h
@@ -170,6 +170,12 @@ int	_EXFUN(pthread_setschedprio, (pthread_t thread, int prio));
 
 #endif /* defined(_POSIX_THREAD_PRIORITY_SCHEDULING) */
 
+#if __GNU_VISIBLE
+int	pthread_getname_np(pthread_t, char *, size_t) __nonnull(2);
+
+int	pthread_setname_np(pthread_t, const char *) __nonnull(2);
+#endif
+
 #if defined(_POSIX_THREAD_PRIO_INHERIT) || defined(_POSIX_THREAD_PRIO_PROTECT)
 
 /* Mutex Initialization Scheduling Attributes, P1003.1c/Draft 10, p. 128 */
-- 
1.8.4.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]