msc_find_window(9)
π msc_find_window β from the Kernel API Manual, section 9, bestie β¨
Okay so picture this: you're deep in the Intel TH driver, you've got an sg_table, and you're like "which window is this even??" β that's literally the whole plot. msc_find_window goes looking for a window that matches a given sg_table. That's it. That's the girl. π
β¨ NAME β¨
msc_find_window β find a window matching a given sg_table π¦
πΈ SYNOPSIS πΈ
struct msc_window * msc_find_window (struct msc *msc , struct sg_table
*sgt , bool nonempty );
Lowkey the whole thing in one line, ngl. π
π ARGUMENTS π
mscβ the MSC device. Your main character. πsgtβ the SG table of the window, i.e. the thing we're matching against. πnonemptyβ skip over empty windows. Set it and empty ones just don't get a look in, periodt. π
π«Ά RETURN π«Ά
An MSC window structure pointer is what you get. Or NULL if the window could not be found β and yes, that's the "she's not here" outcome, no cap. π
π SEE ALSO π
Kernel file ./drivers/hwtracing/intel_th/msu.c, plus the whole friend group:
struct msc_window(9)struct msc_iter(9)struct msc(9)struct msu_buffer_entry(9)msc_is_last_win(9)msc_next_window(9)msc_oldest_window(9)msc_win_oldest_sg(9)msc_buffer_iterate(9)msc_buffer_clear_hw_header(9)msc_configure(9)msc_disable(9)msc_buffer_contig_alloc(9)msc_buffer_contig_free(9)msc_buffer_contig_get_page(9)msc_buffer_win_alloc(9)msc_buffer_win_free(9)msc_buffer_relink(9)msc_buffer_free(9)msc_buffer_alloc(9)msc_buffer_unlocked_free_unless_used(9)msc_buffer_free_unless_used(9)msc_buffer_get_page(9)struct msc_win_to_user_struct(9)msc_win_to_user(9)intel_th_msc_window_unlock(9)
Fr fr, that SEE ALSO list is giving "invited the entire group chat to the function" energy, and honestly? Iconic. π§
K bye ily, this page lives in ./drivers/hwtracing/intel_th and it was last touched October 2026 β go read the source, it's a slay ππΈ
π¦ 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