kref_put_mutex(9)
β¨ NAME β¨
kref_put_mutex β decrement refcount for object, periodt. π
This is the kref_put_mutex(9) page from the Kernel API Manual, and bestie, it's lowkey iconic. π«Ά
πΈ SYNOPSIS πΈ
int kref_put_mutex (struct kref *kref , void (*release)(struct kref *kref) , struct mutex *mutex );
π ARGUMENTS π
krefβ the object in question, bestie. πreleaseβ a pointer to the function that will clean up the object when the last reference to the object is released. π₯mutexβ the mutex which protects thereleasefunction. π¦
π¦ DESCRIPTION π¦
Okay so this is a variant of kref_lock, and the vibe is: it calls the release function with the mutex held. π₯ Then the release function will release the mutex β that's the whole bit, no cap. π
π SEE ALSO π
Kernel file ./include/linux/kref.h, plus these besties: kref_init(9), kref_get(9), kref_put(9), kref_put_lock(9), and kref_get_unless_zero(9). π
mwah π β source/version: ./include/linux, date: October 2026, page: kref_put_mutex(9). Stay slaying, bestie! π«Ά
π¦ 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