]> git.saurik.com Git - apple/xnu.git/blobdiff - libkern/img4/interface.c
xnu-4903.221.2.tar.gz
[apple/xnu.git] / libkern / img4 / interface.c
diff --git a/libkern/img4/interface.c b/libkern/img4/interface.c
new file mode 100644 (file)
index 0000000..3863334
--- /dev/null
@@ -0,0 +1,18 @@
+#include <libkern/libkern.h>
+#include <libkern/section_keywords.h>
+#include <libkern/img4/interface.h>
+
+#if defined(SECURITY_READ_ONLY_LATE)
+SECURITY_READ_ONLY_LATE(const img4_interface_t *) img4if = NULL;
+#else
+const img4_interface_t *img4if = NULL;
+#endif
+
+void
+img4_interface_register(const img4_interface_t *i4)
+{
+       if (img4if) {
+               panic("img4 interface already set");
+       }
+       img4if = i4;
+}