__synth_event_gen_cmd_start(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 __synth_event_gen_cmd_start 🌸

okay so bestie, welcome to the Kernel API Manual β€” this little cutie is __synth_event_gen_cmd_start, and it's literally the "start a synthetic event command from an arg list" girlie. πŸ’…


✨ NAME ✨

__synth_event_gen_cmd_start β€” start a synthetic event command from an arg list πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

int __synth_event_gen_cmd_start (struct dynevent_cmd *cmd , const char *name , struct module *mod , ... );

πŸ’– ARGUMENTS πŸ’–

  • cmd β€” a pointer to the dynevent_cmd struct representing the new event. like, the whole vibe container for it 🫢
  • name β€” the name of the synthetic event. name her, bestie ✨
  • mod β€” the module creating the event, or NULL if it's not created from a module
  • ... β€” a variable number of args in pairs, one pair for each field πŸ‘‘

🧚 NOTE 🧚

okay real talk β€” users normally won't want to call this function directly πŸ™ˆ instead use the synth_event_gen_cmd_start wrapper, which automatically adds a NULL to the end of the arg list for you. so convenient, honestly iconic. but if you do use this function directly, make sure the last arg in the variable arg list is NULL. no cap, that part matters. πŸ’€

This generates a synthetic event command to be executed by synth_event_gen_cmd_end. and here's the serve: this function can be used to generate the complete command or only the first part of it. in that latter case, synth_event_add_field, synth_event_add_field_str, or synth_event_add_fields can be used to add more fields following this. expansion pack energy πŸ“

There should be an even number of variable args, each pair consisting of a type followed by a field name. type + name, type + name, it's giving matching set 🌸

See synth_field_size for available types. and if field_name contains [n], the field is considered to be an array. noted! ✨


πŸ”₯ RETURN πŸ”₯

0 if successful, error otherwise. that's it, that's the whole mood πŸ’œ


🌈 SEE ALSO 🌈

Kernel file ./kernel/trace/trace_events_synth.c β€” plus the whole friend group:


okay that's the whole page, bestie, go forth and synthesize βœ¨πŸ’…

sign-off szn: this one lives in ./kernel/trace, dated October 2026, and the version tag is literally __synth_event_gen_cmd_start(9) β€” that's the whole footer, mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from