aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/percpu-refcount.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-06-12 20:43:06 -0700
committerTejun Heo <tj@kernel.org>2013-06-12 20:43:06 -0700
commitac899061a93250c28562f05ad94d5c74603415bc (patch)
tree26acc69d4b0f509b2ee0693d3fd7b0fd12232059 /include/linux/percpu-refcount.h
parentpercpu-refcount: consistently use plain (non-sched) RCU (diff)
downloadlinux-dev-ac899061a93250c28562f05ad94d5c74603415bc.tar.xz
linux-dev-ac899061a93250c28562f05ad94d5c74603415bc.zip
percpu-refcount: cosmetic updates
* s/percpu_ref_release/percpu_ref_func_t/ as it's customary to have _t postfix for types and the type is gonna be used for a different type of callback too. * Add @ARG to function comments. * Drop unnecessary and unaligned indentation from percpu_ref_init() function comment. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Kent Overstreet <koverstreet@google.com>
Diffstat (limited to 'include/linux/percpu-refcount.h')
-rw-r--r--include/linux/percpu-refcount.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/percpu-refcount.h b/include/linux/percpu-refcount.h
index abe141172d96..b61bd6f23985 100644
--- a/include/linux/percpu-refcount.h
+++ b/include/linux/percpu-refcount.h
@@ -51,7 +51,7 @@
#include <linux/rcupdate.h>
struct percpu_ref;
-typedef void (percpu_ref_release)(struct percpu_ref *);
+typedef void (percpu_ref_func_t)(struct percpu_ref *);
struct percpu_ref {
atomic_t count;
@@ -62,11 +62,11 @@ struct percpu_ref {
* percpu_ref_kill_rcu())
*/
unsigned __percpu *pcpu_count;
- percpu_ref_release *release;
+ percpu_ref_func_t *release;
struct rcu_head rcu;
};
-int percpu_ref_init(struct percpu_ref *, percpu_ref_release *);
+int percpu_ref_init(struct percpu_ref *ref, percpu_ref_func_t *release);
void percpu_ref_kill(struct percpu_ref *ref);
#define PCPU_STATUS_BITS 2
@@ -78,6 +78,7 @@ void percpu_ref_kill(struct percpu_ref *ref);
/**
* percpu_ref_get - increment a percpu refcount
+ * @ref: percpu_ref to get
*
* Analagous to atomic_inc().
*/
@@ -99,6 +100,7 @@ static inline void percpu_ref_get(struct percpu_ref *ref)
/**
* percpu_ref_put - decrement a percpu refcount
+ * @ref: percpu_ref to put
*
* Decrement the refcount, and if 0, call the release function (which was passed
* to percpu_ref_init())