lc_get_cumulative(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ lc_get_cumulative πŸ’…

okay so bestie, welcome to the kernel API manual for lc_get_cumulative(9) β€” yes that (9) means it's a kernel thing, we're in the big leagues now πŸŽ€


🌸 NAME 🌸

lc_get_cumulative β€” it's literally lc_get but with a glow-up: it also finds the elements that are about to be changed πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

struct lc_element * lc_get_cumulative (struct lru_cache *lc , unsigned
int enr );

πŸ’– ARGUMENTS πŸ’–

  • lc β€” the lru cache we're operating on, bestie. that's the whole vibe check target 🎯
  • enr β€” the label to look up. the thing we're hunting for πŸ”

✨ DESCRIPTION ✨

so here's the tea β˜• β€” unlike lc_get, this one also returns the element for enr if it belongs to a pending transaction. so the return values are exactly like the ones for lc_get, plus this extra one:

pointer to an element that's already chillin' on the "to_be_changed" list. and in this case, the cache was already marked LC_DIRTY. no cap, it's flagged πŸ’€

and now the important part, bestie, listen up 🫢 β€” the caller needs to make sure that the pending transaction is completed before proceeding to actually use this element. like, don't touch it until the transaction's done, fr fr. periodt.


🌈 SEE ALSO 🌈

kernel file ./lib/lru_cache.c β€” the source of truth, go read it iykyk πŸ“–


okay that's the whole page, you ate that πŸ’… this came to you from ./lib, dated October 2026, and it's filed under lc_get_cumulative(9) β€” iconic, no notes πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from