[PATCH] Added declaration of method pthread_getname_np

Tanu Hari Dixit tokencolour at gmail.com
Wed Apr 19 15:02:32 UTC 2017


Hello all,

Please let me know if this is okay.

Thanks,
Tanu Hari Dixit.

On Wed, Apr 19, 2017 at 8:30 PM, tokencolour <tokencolour at 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
>



More information about the devel mailing list