About Thread_Cancel

Richi Dubey richidubey at gmail.com
Wed Feb 24 07:54:24 UTC 2021


Hi,

Can someone please give a brief overview of what these three lines aim to
achieve:

  } else if ( _Thread_Is_life_change_allowed( previous ) ) {
    _Thread_Add_life_change_request( the_thread );
    _Thread_State_release( the_thread, &lock_context );

    _Thread_Finalize_life_change( the_thread, priority );

492 threadrestart.c

I am asking because in line 92
<https://git.rtems.org/rtems/tree/testsuites/sptests/sp02/init.c#n92> of
sp02 <https://git.rtems.org/rtems/tree/testsuites/sptests/sp02/init.c>,
this _Thread_Cancel function is called, and because of
_Thread_Add_life_change_request( the_thread ) ->_Thread_Set_state_locked
-> _Scheduler_Block is called and because
of _Thread_Finalize_life_change->_Thread_Remove_life_change_request->_Thread_Clear_state_locked->_Scheduler_Unblock
is called, which is contradictory.

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


More information about the devel mailing list