<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 17, 2021 at 1:54 AM Richi Dubey <<a href="mailto:richidubey@gmail.com">richidubey@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<br><div><br></div><div>I am debugging tm19 running on Strong APA scheduler. It gives the following error:</div>rtems_signal_catch FAILED -- expected (RTEMS_SUCCESSFUL) got (RTEMS_NOT_IMPLEMENTED)<br><div><br></div><div>which is due to line <a href="https://git.rtems.org/rtems/tree/testsuites/tmtests/tm19/task1.c#n167" target="_blank">167</a>. This arises because the variable is_non_preempt_mode_supported in _Scheduler_Control of SMP Strong APA scheduler is set to false. </div><div><br></div><div>On further checking, I can see that almost all the SMP schedulers have this variable set as false in cpukit/include/rtems/scheduler.h. Please let me know why this is the case. What would I need to do to support non preempt tasks in the Strong APA scheduler?</div></div></blockquote><div><br></div><div>No preempt does not make sense in an SMP environment. The idea with</div><div>no preempt is that by setting it, the thread runs without another thread (only </div><div>interrupts) preempting it. This works fine on uniprocessor systems but since</div><div>there are always multiple threads running in SMP, the assumption is </div><div>violated.</div><div><br></div><div>No preempt is an old RTOS feature and sometimes has a name like </div><div>scheduler lock. It is just one of the features/APIs not safe for SMP that</div><div>we removed or made inoperable in SMP mode. This section in the </div><div>manual covers these features:<br><br><a href="https://docs.rtems.org/branches/master/c-user/symmetric_multiprocessing_services.html#application-issues">https://docs.rtems.org/branches/master/c-user/symmetric_multiprocessing_services.html#application-issues</a><br><br>This is definitely an area where you have to think a bit at the </div><div>conceptual purpose of the API/feature to realize why it can't</div><div>work or is unsafe in SMP mode.</div><div><br></div><div>--joel </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote></div></div>