summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2015-06-19 11:36:25 +0200
committerKaleb KEITHLEY <kkeithle@redhat.com>2015-06-21 06:14:27 -0700
commitc7f309116d8fa62f6b9fd6ff2902e8ce4bfa192d (patch)
treef79d40785a357d581f751d6a493b263ecf655550 /libglusterfs
parent6674e9e692d3c52e5eb4bf5c44d2d3195e03402b (diff)
refcount: correct the documentation
The only check that _gf_ref_get() needs is "== 0" for detecting a failure. The actual return value is not guaranteed to be the number of active refences (they can change in other threads anyway). BUG: 1163543 Change-Id: I8801601eab37046f5a5ee0bce5a62606115ca151 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11328 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/refcount.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/libglusterfs/src/refcount.h b/libglusterfs/src/refcount.h
index 19fa77de9aa..e850e6389ae 100644
--- a/libglusterfs/src/refcount.h
+++ b/libglusterfs/src/refcount.h
@@ -38,17 +38,17 @@ struct _gf_ref_t {
typedef struct _gf_ref_t gf_ref_t;
-/* _gf_ref_get -- increase the refcount and return the number of references
+/* _gf_ref_get -- increase the refcount
*
* @return: greater then 0 when a reference was taken, 0 when not
*/
unsigned int
_gf_ref_get (gf_ref_t *ref);
-/* _gf_ref_put -- decrease the refcount and return the number of references
+/* _gf_ref_put -- decrease the refcount
*
* @return: greater then 0 when there are still references, 0 when cleanup
- * should be done
+ * should be done, gf_ref_release_t is called on cleanup
*/
unsigned int
_gf_ref_put (gf_ref_t *ref);
@@ -95,7 +95,7 @@ _gf_ref_init (gf_ref_t *ref, gf_ref_release_t release, void *data);
/* GF_REF_PUT -- decrease the refcount of a GF_REF_DECL structure
*
* @return: greater then 0 when there are still references, 0 when cleanup
- * should be done
+ * should be done, gf_ref_release_t is called on cleanup
*/
#define GF_REF_PUT(p) _gf_ref_put (&p->_ref)