Names for pthread synchronization objects?

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


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.


--
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20171118/f2abc268/attachment-0002.html>


More information about the devel mailing list