STRUCT DYN_EVENT_OPERATIONS(9)
okay bestie, welcome to struct dyn_event_operations(9) from the Kernel API Manual β this is the page that explains the methods every type of dynamic event has to bring to the function π
.
π¦ NAME π¦
struct dyn_event_operations β methods for each type of dynamic events. β¨
β¨ SYNOPSIS β¨
Itβs giving struct, and hereβs the exact shape, no cap:
struct dyn_event_operations {
struct list_head list;
int (*create)(const char *raw_command);
int (*show)(struct seq_file *m, struct dyn_event *ev);
bool (*is_busy)(struct dyn_event *ev);
int (*free)(struct dyn_event *ev);
bool (*match)(const char *system, const char *event, int argc, const
char **argv, struct dyn_event *ev);
};
π Members π
The struct also has a list member β itβs right there in the synopsis above. The member-by-member deets below are for the method pointers, aka the main characters:
createβ parse-and-create method. This is invoked when a user passes an event definition to thedynamic_eventsinterface. It must not destruct the arguments, and it returns-ECANCELEDif the given arguments doesnβt match its command prefix. π«Άshowβ the showing method. This is invoked when a user reads the event definitions via thedynamic_eventsinterface. πis_busyβ checks whether the given event is busy so that it cannot be deleted. Returnstrueif it is busy, otherwisefalse. πfreeβ deletes the given event. Returns0if success, otherwise error. π§matchβ checks whether the given event and system name match this event. Theargcandargvare used for exact match. Returnstrueif it matches, otherwisefalse. β
πΈ Description πΈ
These methods must be set for each type, since there is no default method β no vibes-based fallback, bestie. π
Before using this for dyn_event_init, it must be registered by dyn_event_register. Periodt.
Except for create, these methods are called under holding event_mutex β so keep that lock situation in mind, iykyk.
π SEE ALSO π
- Kernel file
./kernel/trace/trace_dynevent.h struct dyn_event(9)
Source/version ./kernel/trace, dated October 2026, and page struct dyn_event_operations(9) β byeee, go slay those dynamic events πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms