Hi, This is prototyped in pthread.h in the current tools:
#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 Do you have current tools? Did you define _GNU_SOURCE so this prototype is visible? --joel Are you sure your to On Wed, Apr 19, 2017 at 10:00 AM, tokencolour <tokencol...@gmail.com> wrote: > Gets rid of 1 warning --> > warning: no previous prototype for 'pthread_getname_np' > [-Wmissing-prototypes] > --- > cpukit/posix/include/rtems/posix/pthreadimpl.h | 5 +++++ > cpukit/posix/src/pthreadgetnamenp.c | 1 + > 2 files changed, 6 insertions(+) > > diff --git a/cpukit/posix/include/rtems/posix/pthreadimpl.h > b/cpukit/posix/include/rtems/posix/pthreadimpl.h > index 90a60b6..51a1a2a 100644 > --- a/cpukit/posix/include/rtems/posix/pthreadimpl.h > +++ b/cpukit/posix/include/rtems/posix/pthreadimpl.h > @@ -111,6 +111,11 @@ int rtems_pthread_attribute_compare( > const pthread_attr_t *attr2 > ); > > +/* > + * pthread_getname_np > + */ > +int pthread_getname_np( pthread_t thread, char *name, size_t len ); > + > RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate(void) > { > _Objects_Allocator_lock(); > diff --git a/cpukit/posix/src/pthreadgetnamenp.c b/cpukit/posix/src/ > pthreadgetnamenp.c > index e753823..b1a99f0 100644 > --- a/cpukit/posix/src/pthreadgetnamenp.c > +++ b/cpukit/posix/src/pthreadgetnamenp.c > @@ -16,6 +16,7 @@ > #include <string.h> > > #include <rtems/score/threadimpl.h> > +#include <rtems/posix/pthreadimpl.h> > > int pthread_getname_np( pthread_t thread, char *name, size_t len ) > { > -- > 2.1.4 > > _______________________________________________ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel >
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel