kref: add kref_set()

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>
This commit is contained in:
Evgeniy Polyakov 2007-12-10 23:03:43 +03:00 committed by Greg Kroah-Hartman
parent 775b64d2b6
commit 41ca28ab2a
2 changed files with 14 additions and 2 deletions

View file

@ -24,6 +24,7 @@ struct kref {
atomic_t refcount;
};
void kref_set(struct kref *kref, int num);
void kref_init(struct kref *kref);
void kref_get(struct kref *kref);
int kref_put(struct kref *kref, void (*release) (struct kref *kref));