summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/refcnt.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/refcnt.c b/src/core/refcnt.c
index cd6ab964..e540240f 100644
--- a/src/core/refcnt.c
+++ b/src/core/refcnt.c
@@ -76,3 +76,15 @@ void ref_put ( struct refcnt *refcnt ) {
free ( refcnt );
}
}
+
+/**
+ * Do not free reference-counted object
+ *
+ * @v refcnt Reference counter
+ *
+ * This is meant for initializing a reference counter structure in a
+ * statically allocated object.
+ */
+void ref_no_free ( struct refcnt *refcnt __unused ) {
+ /* Do nothing */
+}