From 076634f2a75984699ac1930f1c81b88e31dab92d Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sun, 27 Nov 2022 12:08:58 +0100 Subject: [PATCH] [doc] kernel_doc: add an example with a function pointer Signed-off-by: Markus Heiser --- docs/linuxdoc-howto/all-in-a-tumble.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/linuxdoc-howto/all-in-a-tumble.h b/docs/linuxdoc-howto/all-in-a-tumble.h index c7b4b51..1134fcc 100644 --- a/docs/linuxdoc-howto/all-in-a-tumble.h +++ b/docs/linuxdoc-howto/all-in-a-tumble.h @@ -26,6 +26,14 @@ int user_function(int a, ...) int user_sum(int a, int b); /* parse-SNAP: */ +/* parse-SNIP: function pointer argument */ +/** + * callback() - Callback function with a function pointer argument + * @fct_ptr: Function to call. + * + */ +void callback(void (*fct_ptr)(void *)); +/* parse-SNAP: */ /** * block_touch_buffer - mark a buffer accessed @@ -323,7 +331,7 @@ typedef int my_typedef; * \| \| |/ |/ * +------+ +------+ * foo() bar() - * + * * Highlighted code blocks: * The next example shows a code block, with highlighting C syntax in the * output.