About Chains in RTEMS

Richi Dubey richidubey at gmail.com
Thu Feb 25 09:47:15 UTC 2021


When I am debugging the call to _Chain_Append_unprotected (from line 92
<https://git.rtems.org/rtems/tree/testsuites/sptests/sp02/init.c#n92> of
sp02, rtems_task_delete -> _Thread_Close ->...->_Thread_Cancel -> ...
->_Scheduler_Unblock -> ... _Scheduler_strong_APA_Insert_ready
-> _Chain_Append_unprotected), I see a weird chain behavior where there's
some kind of cycle:

(gdb) p _Chain_Tail(the_chain)
$20 = (Chain_Node *) 0x200768 <_Configuration_Scheduler_strong_APA_dflt+40>
(gdb) p _Chain_Tail(the_chain)->previous
$21 = (Chain_Node *) 0x2014e8 <_RTEMS_tasks_Objects+2024>
(gdb) p (_Chain_Tail(the_chain)->previous)->previous
$22 = (Chain_Node *) 0x200fe0 <_RTEMS_tasks_Objects+736>
(gdb) p ((_Chain_Tail(the_chain)->previous)->previous)->previous
$23 = (Chain_Node *) 0x2014e8 <_RTEMS_tasks_Objects+2024>
(gdb) p
$24 = (Chain_Node *) 0x200fe0 <_RTEMS_tasks_Objects+736>

sp02 is a single processor test and I am trying to run it on the Strong APA
SMP scheduler. Can someone please give an insight into what might be
causing this? The Strong APA scheduler does not affect the functioning of
the chain, it only uses the chain using standard function headers defined
in chain.h

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20210225/b05b74de/attachment.html>

More information about the devel mailing list