Names for pthread synchronization objects?

Joel Sherrill joel at
Sat Nov 18 16:40:16 UTC 2017

On Nov 18, 2017 10:29 AM, "Sebastian Huber" <
sebastian.huber at> wrote:


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_
3. Add an RTEMS-specific header <rtems/pthread.h> with
rtems_pthread_mutex_set_name(), etc. functions.

I lean to #2.

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  : [ | sebastian.huber
at ] PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
devel mailing list
devel at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the devel mailing list