scmi_allocate_event_handler(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… scmi_allocate_event_handler β€” from the scmi_allocate_event_handler(9) Kernel API Manual πŸŽ€

okay bestie, sit down, grab a strawberry drink πŸ“, because we're diving into the kernel API manual page for scmi_allocate_event_handler, and honestly? it's giving "small function, big responsibilities." ✨


🌸 NAME 🌸

scmi_allocate_event_handler β€” literally just: Allocate Event handler 🫢


✨ SYNOPSIS ✨

struct scmi_event_handler * scmi_allocate_event_handler (struct
scmi_notify_instance *ni , u32 evt_key );

that's the whole signature, no cap. she takes two things and hands you back a pointer to a struct scmi_event_handler. πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ni β€” a reference to the notification instance you wanna use. that's your girl. your context. 🌈
  • evt_key β€” a 32bit key that's uniquely bound to the event identified by the tuple (proto_id, evt_id, src_id). yes, the whole tuple. yes, all three. she's specific. πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

so what she actually does: she allocates an event handler, plus the related notification chain, all associated with the event handler key you passed in. iconic behavior. πŸŽ€

but hear me out β€” at this point, a related registered_event is still to be associated to this handler descriptor, meaning hndl->r_evt == NULL. so the handler gets initialized as pending. it's in its waiting era. πŸ™ˆβœ¨


πŸ”₯ CONTEXT πŸ”₯

this one's important, bestie, don't skip it: she assumes to be called with pending_mtx already acquired. like, that's the vibe check she requires before you even talk to her. πŸ’€

no pending_mtx? no entry. periodt.

⭐ RETURN ⭐

on success: the freshly allocated structure. 🌟 that's it, that's the payoff.


🧚 SEE ALSO 🧚

buckle up, this list is long and honestly kind of a flex πŸ‘‘

Kernel file ./drivers/firmware/arm_scmi/notify.c, Theory of operation(9), struct scmi_notify_instance(9), struct events_queue(9), struct scmi_event_header(9), struct scmi_registered_events_desc(9), struct scmi_registered_event(9), struct scmi_event_handler(9), scmi_lookup_and_call_event_chain(9), scmi_process_event_header(9), scmi_process_event_payload(9), scmi_events_dispatcher(9), scmi_notify(9), scmi_kfifo_free(9), scmi_initialize_events_queue(9), scmi_allocate_registered_events_desc(9), scmi_register_protocol_events(9), scmi_deregister_protocol_events(9), scmi_free_event_handler(9), scmi_bind_event_handler(9), scmi_valid_pending_handler(9), scmi_register_event_handler(9), __scmi_event_handler_get_ops(9), scmi_get_active_handler(9), __scmi_enable_evt(9), scmi_put_handler_unlocked(9), scmi_event_handler_enable_events(9), scmi_notifier_register(9), scmi_notifier_unregister(9), scmi_devm_notifier_register(9), scmi_devm_notifier_unregister(9), scmi_protocols_late_init(9), scmi_notification_init(9), scmi_notification_quiesce(9), scmi_notification_exit(9)


and that's the whole page, bestie!! πŸ«ΆπŸ’–βœ¨

this little beauty lives over in ./drivers/firmware/arm_scmi, and she's stamped October 2026 β€” so yeah, mark your calendar, she's from the future and she's slaying there too. πŸ’…πŸŽ€

πŸ“¦ where this page comes from