How does RTEMS decide which process to execute next on calling rtems_task_exit

Richi Dubey richidubey at gmail.com
Mon Nov 2 16:13:19 UTC 2020


Hi,

While debugging sp16.exe, when Task_1 calls rtems_task_wake_after,
following the stack trace would lead us to the scheduler code that makes a
decision in selecting the next thread to execute. rtems_task_wake_after ->
_Thread_Yield -> _Scheduler_Yield -> *scheduler->Operations.yield.

But I tried a lot and checked inside each stack when Task_5
calls rtems_task_exit(), but I could not find any code that calls the
scheduler to make a decision on the next thread to execute. I also tried
setting watchpoint, but to no avail:

--------------------------
rtems_task_exit () at
/home/richi/quick-start/src/rtems/c/src/../../cpukit/rtems/src/taskexit.c:23
23 {
(gdb) awatch cpu_self->heir
Hardware access (read/write) watchpoint 8: cpu_self->heir
(gdb) c
Continuing.
Watchpoint 8 deleted because the program has left the block
in which its expression is valid.

Thread 1 hit Breakpoint 5, _Terminate (the_source=RTEMS_FATAL_SOURCE_EXIT,
the_error=0) at
/home/richi/quick-start/src/rtems/c/src/../../cpukit/score/src/interr.c:36
36  _User_extensions_Fatal( the_source, the_error );
(gdb)
--------------------------

Can someone tell me how I can achieve my goal?

Thanks,
Richi.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20201102/87d2b651/attachment.html>


More information about the devel mailing list