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

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


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
23 {
(gdb) awatch cpu_self->heir
Hardware access (read/write) watchpoint 8: cpu_self->heir
(gdb) c
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
36  _User_extensions_Fatal( the_source, the_error );

Can someone tell me how I can achieve my goal?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the devel mailing list