The _CPU_Context_Restart_self is responsible for somehow restarting the currently executing task. If you are lucky when porting RTEMS, then all that is necessary is restoring the context. Otherwise, there will need to be a routine that does something special in this case. Performing a _CPU_Context_Restore on the currently executing task after reinitializing that context should work on most ports. It will not work if restarting self conflicts with the stack frame assumptions of restoring a context.
The following is an implementation of _CPU_Context_Restart_self that can be used when no special handling is required for this case.
#define _CPU_Context_Restart_self( _the_context ) \ _CPU_Context_restore( (_the_context) )
XXX find a port which does not do it this way and include it here
Copyright © 1988-2007OAR Corporation