On Mon, May 9, 2016 at 1:07 PM, Joel Sherrill <joel.sherr...@oarcorp.com> wrote: > > One complication on RTEMS which is a single process, multi-threaded RTOS > is that we can no longer check the stack bounds. For threads, we know > where the stack memory is and the range for each thread. For ucontext_t, > it seems this knowledge is unknown to the RTOS. > > Thus it would become the responsibility of the run-time using ucontext_t > to put in fence patterns and check those.
On RTEMS and similar systems, you could write makecontext to register the stack (whose start and length are known to the function) with the RTOS. Ian