[PATCH] posix: Use alias for pthread_self()

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Apr 28 05:04:34 UTC 2021


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.

-- 
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/



More information about the devel mailing list