[PATCH] posix: Use alias for pthread_self()
Joel Sherrill
joel at rtems.org
Wed Apr 28 13:03:15 UTC 2021
On Wed, Apr 28, 2021 at 12:04 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:
>
> On 28/04/2021 00:28, Joel Sherrill wrote:
> >
> >
> > On Tue, Apr 27, 2021, 11:24 AM Sebastian Huber
> > <sebastian.huber at embedded-brains.de
> > <mailto:sebastian.huber at embedded-brains.de>> wrote:
> >
> > On 27/04/2021 18:23, Gedare Bloom wrote:
> >
> > > PS: the git-rm is missing?
> > Oh, yes. I will fix this if Joel is happy with the change.
> >
> >
> > Can you set a breakpoint on it as pthread_self?
>
> Yes, this works:
>
> (gdb) b pthread_self
> Breakpoint 6 at 0x105fac: file ../../../cpukit/rtems/src/taskself.c,
> line 29.
> (gdb) c
> Continuing.
>
> Breakpoint 6, rtems_task_self () at ../../../cpukit/rtems/src/taskself.c:29
> 29 return _Thread_Get_executing()->Object.id;
> (gdb)
>
> (gdb) print pthread_self
> $1 = {rtems_id (void)} 0x105fa8 <rtems_task_self>
>
> >
> > It is an odd case but I think I would rather have a score method and
> > both be aliases.
> I could add an _Thread_Self_id() with aliases rtems_task_self and
> pthread_self.
>
It's rather trivial but I would feel better about that. Is there an inline
method like this currently? I think there have been one at various
times across RTEMS history.
--joel
>
> --
> embedded brains GmbH
> Herr Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.huber at embedded-brains.de
> phone: +49-89-18 94 741 - 16
> fax: +49-89-18 94 741 - 08
>
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20210428/1eebe475/attachment.html>
More information about the devel
mailing list