From b989f9ed9fe13be2cb168d2d45c235f011104f38 Mon Sep 17 00:00:00 2001 From: Jerome Forissier Date: Fri, 18 Apr 2025 16:09:33 +0200 Subject: test: lib: add initjmp() test Test the initjmp() function when HAVE_INITJMP is set. Use the test as an example in the API documentation. Signed-off-by: Jerome Forissier Reviewed-by: Ilias Apalodimas --- doc/api/setjmp.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc/api') diff --git a/doc/api/setjmp.rst b/doc/api/setjmp.rst index 7718047085c..c30e51c2b55 100644 --- a/doc/api/setjmp.rst +++ b/doc/api/setjmp.rst @@ -8,3 +8,13 @@ Long jump API .. kernel-doc:: include/setjmp.h :internal: + +Example +------- + +Here is an example showing how to use the a long jump functions and +initjmp() in particular: + +.. literalinclude:: ../../test/lib/initjmp.c + :language: c + :linenos: -- cgit v1.2.3