summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorJoshua Oreman2009-11-26 02:27:50 +0100
committerMichael Brown2010-06-23 01:34:48 +0200
commit719ba316dfc7c32f12375917301718af51509e5f (patch)
treef1d06dd58b69b9cbf1e6fc9d3e8243be84a199f6 /src/core
parent[http] Pass through unknown interface method calls (diff)
downloadipxe-719ba316dfc7c32f12375917301718af51509e5f.tar.gz
ipxe-719ba316dfc7c32f12375917301718af51509e5f.tar.xz
ipxe-719ba316dfc7c32f12375917301718af51509e5f.zip
[refcnt] Add ref_no_free handler
Since more reference-counted structures than embedded images might want to mark themselves unfreeable, expose a dummy ref_no_free(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
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 */
+}