Names for pthread synchronization objects?

Gedare Bloom gedare at rtems.org
Mon Nov 20 15:39:24 UTC 2017


On Sat, Nov 18, 2017 at 11:40 AM, Joel Sherrill <joel at rtems.org> wrote:
>
>
> On Nov 18, 2017 10:29 AM, "Sebastian Huber"
> <sebastian.huber at embedded-brains.de> wrote:
>
> Hello,
>
> all the POSIX synchronization objects use thread queues. Each thread queue
> has a name member. It would be nice to have a function to set this name.
> Unfortunately there is no POSIX, glibc, FreeBSD or QNX function to do this.
> Some IBM OS have a pthread_mutexattr_setname_np(). For threads glibc has a
> pthread_setname_np(). We have some options.
>
> 1. Offer no function to set the names (not really great for debugging and
> system diagnostics).
> 2. Add *_np() functions to Newlib pthread.h, e.g.
> pthread_mutex_setname_np(mtx, name),
> PTHREAD_MUTEX_NAMED_INITIALIZER_NP(name).
> 3. Add an RTEMS-specific header <rtems/pthread.h> with
> rtems_pthread_mutex_set_name(), etc. functions.
>
>
> I lean to #2.
>
Me too.

>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax     : +49 89 189 47 41-09
> E-Mail  : [ http://lists.rtems.org/mailman/listinfo/devel | sebastian.huber
> at embedded-brains.de ] PGP     : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
>
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel



More information about the devel mailing list