6 * include/linux/kernel.h
22 * Documentation/kref.txt
27 * kref\\_init - struct kref pointer
28 * kref\\_get - struct kref pointer
29 * kref\\_put - struct kref pointer and release function
33 * Embed struct kref into your own structure
34 * Do not forget to call kref\\_init when initializing your structure
35 * Pass a release function as parameter to kref\\_put, where you release your
37 * Follow the rules for calling kref\\_get and kref\\_put
41 * Must increment count if passing a non-temporary copy
42 * May increment count without a lock if already has a valid pointer
43 * Must decrement when done with the pointer
44 * If code never tries to get a ref without a valid pointer, may be done without
46 * Must serialize getting a ref without a valid pointer with putting a ref