Skip to content

Commit

Permalink
[doc] kernel_doc: add an example with a function pointer
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
  • Loading branch information
return42 committed Nov 27, 2022
1 parent 365e4b1 commit 076634f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/linuxdoc-howto/all-in-a-tumble.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 076634f

Please sign in to comment.