ttm_lru_first_res_or_null(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ ttm_lru_first_res_or_null(9) ✨

okay bestie, so this one is a little kernel API manual page, like from the Kernel API Manual collection β€” and honestly? it's short, it's sweet, and it does exactly one (1) thing. let's get into it πŸ’…


🌸 NAME 🌸

ttm_lru_first_res_or_null β€” literally just peeks at an lru list and hands you back the first resource on it. that's the whole vibe. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct ttm_resource * ttm_lru_first_res_or_null (struct list_head *head
);

yes queen, that's the whole signature. one argument, one pointer back, no drama. ✨


πŸ’– ARGUMENTS πŸ’–

  • head β€” the list head of the lru list. like, the entry point to the whole thing. you hand it over, it does the looking. 🫢

⭐ RETURN ⭐

a pointer to the first resource on the lru list β€” slay β€” or NULL if there isn't one. that's it. if the list is empty you get NULL, no cap, no surprises. 😭

fr fr, check for that NULL before you dereference, bestie. the function is honest about it but it's still on you. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file this lives in:

  • ./drivers/gpu/drm/ttm/ttm_resource.c

and the whole friend group of related pages, gathered here so you never have to go looking:


and that's the whole page, bestie, you ate it up πŸ’… this little icon came straight out of ./drivers/gpu/drm/ttm, dated October 2026 β€” go forth and lru πŸ¦‹βœ¨

πŸ“¦ where this page comes from