casaroli opened a new pull request, #20724:
URL: https://github.com/apache/nuttx/pull/20724

   ## Summary
   
   Adds the ucontext functions (`getcontext()`, `setcontext()`, 
`makecontext()`, `swapcontext()`) and `include/ucontext.h`, with an arm64 
implementation that selects the new `ARCH_HAVE_UCONTEXT`. Programs that switch 
between their own stacks, such as coroutine libraries, need them.
   
   A context holds the callee-saved registers, the stack pointer, the program 
counter, the arguments of `makecontext()`, the callee-saved FP registers when 
there is an FPU, and the signal mask. A context from `makecontext()` continues 
with `uc_link` when its function returns, or the task exits if `uc_link` is 
NULL.
   
   ## Impact
   
   New header and functions, arm64 only. Nothing else changes.
   
   ## Testing
   
   Builds: `qemu-armv8a:nsh`, `qemu-armv8a:knsh`, `lm3s6965-ek:qemu-flat`.
   
   `tools/checkpatch.sh -c -u -m -g` passes.
   
   A test program on `qemu-armv8a:knsh`: a `getcontext()`/`setcontext()` loop, 
chained contexts with arguments, `uc_link`, a function with 10 arguments, and 
FP registers preserved across `swapcontext()`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to