get_event_struct(9)
π get_event_struct(9) β like, the kernel API manual, but make it make sense
okay so bestie, welcome to the Kernel API Manual section 9, and today's main character is get_event_struct. it's a tiny lil function with a big job and honestly? she ate. let's get into it π«Ά
β¨ NAME β¨
get_event_struct β grabs the next free event in the pool. that's it. that's the whole gig. no cap. π
πΈ SYNOPSIS πΈ
struct srp_event_struct * get_event_struct (struct event_pool *pool );
like yes, that's the signature, and yes, you're gonna want to stare at it for a sec. the vibes are: you hand her a pool, she hands you back a pointer to a struct srp_event_struct (or, plot twist, NULL). π₯
π¦ ARGUMENTS π¦
poolβ theevent_poolthat contains the events to be searched π this is the pool she's gonna rummage through looking for a free one.
π DESCRIPTION π
so here's the tea: get_event_struct returns the next event that's in the "free" state. and if literally none of them are free? she returns NULL. no drama, no error code, just NULL. π
β οΈ minor but important warning, bestie: no synchronization is done here. like, none. zero. she does not lock anything. the assumption is that thehost_lockwill syncrhonze things (and yes that spelling is canon, don't come for me π). so if you're calling this without holdinghost_lock, that's on you, and it's giving "undefined behaviour at 3am." π
π SEE ALSO π
okay this list is LONG and honestly it's giving "the whole friend group showed up." but every single one matters, so here we go β first up, the kernel file:
Kernel file ./drivers/scsi/ibmvscsi/ibmvscsi.c
and then the squad:
ibmvscsi_handle_event(9)ibmvscsi_release_crq_queue(9)crq_queue_next_crq(9)ibmvscsi_send_crq(9)ibmvscsi_task(9)ibmvscsi_reset_crq_queue(9)ibmvscsi_init_crq_queue(9)ibmvscsi_reenable_crq_queue(9)initialize_event_pool(9)release_event_pool(9)valid_event_struct(9)free_event_struct(9)init_event_struct(9)unmap_cmd_data(9)map_sg_data(9)map_data_for_srp_cmd(9)purge_requests(9)ibmvscsi_set_request_limit(9)ibmvscsi_reset_host(9)ibmvscsi_timeout(9)ibmvscsi_send_srp_event(9)handle_cmd_rsp(9)lun_from_dev(9)ibmvscsi_queuecommand_lck(9)map_persist_bufs(9)unmap_persist_bufs(9)login_rsp(9)send_srp_login(9)capabilities_rsp(9)send_mad_capabilities(9)fast_fail_rsp(9)enable_fast_fail(9)adapter_info_rsp(9)send_mad_adapter_info(9)ibmvscsi_eh_host_reset_handler(9)ibmvscsi_handle_crq(9)ibmvscsi_sdev_configure(9)ibmvscsi_change_queue_depth(9)ibmvscsi_get_desired_dma(9)ibmvscsi_resume(9)
and that's the whole page, bestie. stay hydrated, hold host_lock, and remember: free event or NULL, there is no in between π
β¨
this iconic lil page lives in ./drivers/scsi/ibmvscsi, dated October 2026, and it's get_event_struct(9) forever and always π
π¦ 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