Skip to content

Commit 02b75ec

Browse files
committed
tracing: Add kerneldoc to trace_event_buffer_reserve()
Add a appropriate kerneldoc to trace_event_buffer_reserve() to make it easier to understand how that function is used. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://patch.msgid.link/20260130103745.1126e4af@gandalf.local.home Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent a46023d commit 02b75ec

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

kernel/trace/trace_events.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,22 @@ bool trace_event_ignore_this_pid(struct trace_event_file *trace_file)
649649
}
650650
EXPORT_SYMBOL_GPL(trace_event_ignore_this_pid);
651651

652+
/**
653+
* trace_event_buffer_reserve - reserve space on the ring buffer for an event
654+
* @fbuffer: information about how to save the event
655+
* @trace_file: the instance file descriptor for the event
656+
* @len: The length of the event
657+
*
658+
* The @fbuffer has information about the ring buffer and data will
659+
* be added to it to be used by the call to trace_event_buffer_commit().
660+
* The @trace_file is the desrciptor with information about the status
661+
* of the given event for a specific trace_array instance.
662+
* The @len is the length of data to save for the event.
663+
*
664+
* Returns a pointer to the data on the ring buffer or NULL if the
665+
* event was not reserved (event was filtered, too big, or the buffer
666+
* simply was disabled for write).
667+
*/
652668
void *trace_event_buffer_reserve(struct trace_event_buffer *fbuffer,
653669
struct trace_event_file *trace_file,
654670
unsigned long len)

0 commit comments

Comments
 (0)