lc_try_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

Okay bestie, welcome to the Kernel API Manual page for lc_try_get(9) ✨

lc_try_get β€” get element by label, if present; do not change the active set. Periodt πŸ’…


✨ SYNOPSIS ✨

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

πŸŽ€ ARGUMENTS πŸŽ€

  • lc β€” the lru cache to operate on 🫢
  • enr β€” the label to look up πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe: it finds an element in the cache, increases its usage count, β€œtouches” it, and returns it. Iconic behavior, honestly ✨

Return values, bestie:

  • NULL β€” the cache was marked LC_STARVING, or the requested label was not in the active set 😭
  • pointer to the element with the REQUESTED element number β€” in this case, it can be used right away πŸ”₯
Active set stays unbothered. Do not change it. No cap πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./lib/lru_cache.c plus the whole squad:

lc_create(9), lc_destroy(9), lc_reset(9), lc_seq_printf_stats(9), lc_find(9), lc_is_used(9), lc_del(9), lc_get(9), lc_get_cumulative(9), lc_committed(9), lc_put(9), lc_element_by_index(9), lc_seq_dump_details(9) πŸ’–


Catch you in ./lib, dated October 2026 β€” lc_try_get(9) signing off, mwah πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from