lc_try_get(9)
π 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 markedLC_STARVING, or the requested label was not in the active set π- pointer to the element with the
REQUESTEDelement 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
- 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