summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorJerome Forissier <[email protected]>2025-04-18 16:09:33 +0200
committerTom Rini <[email protected]>2025-04-23 13:19:44 -0600
commitb989f9ed9fe13be2cb168d2d45c235f011104f38 (patch)
tree76459f56909778c556fba1b21a2eb38de22c8618 /doc/api
parenta27844cc9443341ffe1314ccc4c384a54ad1ae32 (diff)
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 <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/setjmp.rst10
1 files changed, 10 insertions, 0 deletions
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: