ttm_resourc...for_each_res(9)
π¦ NAME π¦
okay so bestie, this is the <pink>ttm_resource_manager_for_each_res</pink> page from the Kernel API Manual β yes, the kernel actually has a manual, and yes, it's kinda iconic. what it does: iterate over all resources. that's the whole vibe. β¨
π SYNOPSIS π
ttm_resource_manager_for_each_res (cursor , res );
like, that's it. that's the call. no cap. π
πΈ ARGUMENTS πΈ
cursorβ astruct ttm_resource_cursorthat holds the current position of the loop, like a little bookmark for where you're at rn. πresβ the current resource. literally the one you're looking at in this iteration. π
π«Ά DESCRIPTION π«Ά
so the way that this works is you get to iterate over all the evictable resources in a resource manager. all of them. every single one. it's giving "for each" energy and honestly? obsessed. π§
lowkey important: the resources you're walking over are the evictable ones living in a resource manager β that's the scope, bestie, don't forget it. π
π SEE ALSO π
the kernel file this lives in is ./include/drm/ttm/ttm_resource.h β go look, it's right there. π
and the whole friend group (the related pages, fr fr):
TTM_NUM_MOVE_FENCES(9)enum ttm_lru_item_type(9)struct ttm_lru_item(9)ttm_lru_item_init(9)struct ttm_resource_manager(9)struct ttm_bus_placement(9)struct ttm_resource(9)ttm_lru_item_to_res(9)struct ttm_lru_bulk_move_pos(9)struct ttm_lru_bulk_move(9)struct ttm_resource_cursor(9)struct ttm_kmap_iter_iomap(9)struct ttm_kmap_iter_linear_io(9)ttm_resource_manager_set_used(9)ttm_resource_manager_used(9)ttm_resource_manager_cleanup(9)
okay that's the page!! π this one came out of ./include/drm/ttm, dated October 2026, and it's filed under ttm_resourc...for_each_res(9) β go forth and iterate, bestie, you got this π«Άπβ
π¦ 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