summaryrefslogtreecommitdiff
path: root/include/linux/kref.h
AgeCommit message (Collapse)Author
2009-09-26headers: kref.h reduxAlexey Dobriyan
* remove asm/atomic.h inclusion from kref.h -- not needed, linux/types.h is enough for atomic_t * remove linux/kref.h inclusion from files which do not need it. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-30Remove "#ifdef __KERNEL__" checks from unexported headersRobert P. J. Day
Remove the "#ifdef __KERNEL__" tests from unexported header files in linux/include whose entire contents are wrapped in that preprocessor test. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-24kref: add kref_set()Evgeniy Polyakov
This adds kref_set() to the kref api for future use by people who really know what they are doing with krefs... From: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-03-08[PATCH] kref: make kref_put return if this was the last put call.Greg Kroah-Hartman
This is needed for the upcoming klist code from Pat. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2004-09-01Use "ifdef" rather than "if" to test for __KERNEL__Linus Torvalds
Both work, but the latter can cause warnings in user space from compilers that don't like using undefined identifiers in preprocessor expressions (quite reasonable). Pointed out by Randy Dunlap.
2004-08-31Allow the compiler to notice "constant" header file.Linus Torvalds
Both gcc and sparse will speed up tokenization by noticing when a header file is protected by the standard preprocessor #ifndef .. #endif exclusion. However, that requires that the headers actually _use_ that standard exclusion. Some did their own little broken dance.
2004-08-22KREF: make kref_get() return void as it makes sense to do so.Greg Kroah-Hartman
Thanks to Kiran for bugging me to do this. Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2004-08-02KREF: shrink the size of struct kref down to just a single atomic_tGreg Kroah-Hartman
This was based on a patch from Kiran, but tweaked further by me. Signed-off-by: Ravikiran Thirumalai <kiran@in.ibm.com> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2004-03-14kref: add kref structure to kernel tree.Greg Kroah-Hartman
Based on the kobject structure, but much smaller and simpler to use.