Which threads execute _Thread_Handler ?
Richi Dubey
richidubey at gmail.com
Fri Dec 11 07:37:17 UTC 2020
Thanks for your replies.
Great suggestion about setting up a breakpoint at _Thread_Handler. After
setting the breakpoint, the code run by Strong_APA does not break, whereas
the default scheduler's code does break:
------------------------
Default Scheduler (That executes correctly without error):
Thread 1 hit Breakpoint 7, Tasks (argument=0) at
/home/richi/quick-start/src/rtems/c/src/../../testsuites/tmtests/tm24/task1.c:110
110 Task_count++;
(gdb) b _Thread_Handler
Breakpoint 8 at 0x10a67e: file
/home/richi/quick-start/src/rtems/c/src/../../cpukit/score/src/threadhandler.c,
line 88.
(gdb) c
Continuing.
Thread 1 hit Breakpoint 8, _Thread_Handler () at
/home/richi/quick-start/src/rtems/c/src/../../cpukit/score/src/threadhandler.c:88
88 executing = _Thread_Executing;
(gdb)
Continuing.
Thread 1 hit Breakpoint 7, Tasks (argument=0) at
/home/richi/quick-start/src/rtems/c/src/../../testsuites/tmtests/tm24/task1.c:110
110 Task_count++;
------------------------
Strong APA execution (The execution that fails/give error):
------------------------
Thread 1 hit Breakpoint 7, Tasks (argument=0) at
/home/richi/quick-start/src/rtems/c/src/../../testsuites/tmtests/tm24/task1.c:110
110 Task_count++;
(gdb) b _Thread_Handler
Breakpoint 8 at 0x1086b2: file
/home/richi/quick-start/src/rtems/c/src/../../cpukit/score/src/threadhandler.c,
line 88.
(gdb) c
Continuing.
Thread 1 hit Breakpoint 5, _Terminate
------------------------
I am going to investigate the scheduler's role in this.
Thanks,
Richi.
On Mon, Dec 7, 2020 at 11:09 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:
> On 05/12/2020 07:13, Richi Dubey wrote:
>
> >
> > The stack trace for the thread looks like this:
> >
> > Tasks (entry function) -> rtems_task_wake_after
> > ->_Thread_Dispatch_direct -> _Thread_Do_dispatch (where the
> > _Context_switch function call lies), how can then the heir thread
> > start executing from the _Thread_Handler? I do not see it in the trace
> > at all.
> The context of new threads is set up by _Thread_Load_environment().
>
> --
> 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/20201211/09b66a87/attachment.html>
More information about the devel
mailing list