summaryrefslogtreecommitdiff
path: root/sys/kern/uipc_mbuf.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-05-16 08:59:05 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-05-16 08:59:05 +0000
commited28d9f800a43c78a30b65269f6fb79cddcbe859 (patch)
tree5cdc5edd1ba74c82ab0b4b35fb37cdc6d63a2338 /sys/kern/uipc_mbuf.c
parentadb0ab8c1a8c909b66f5c7f26df9c7eff365b3bf (diff)
Introduce a new kernel option "SMALL_KERNEL" that will be used to keep the
kernel size down. Two changes. Uninline MALLOC and uninline a few mbuf macros. Saves 140k on alpha RAMDISK (although only 11k after gzip).
Diffstat (limited to 'sys/kern/uipc_mbuf.c')
-rw-r--r--sys/kern/uipc_mbuf.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index 7b4801f9d53..6ca1e718531 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_mbuf.c,v 1.27 2001/05/05 20:57:00 art Exp $ */
+/* $OpenBSD: uipc_mbuf.c,v 1.28 2001/05/16 08:59:04 art Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */
/*
@@ -1029,3 +1029,31 @@ m_apply(m, off, len, f, fstate)
return (0);
}
+
+#ifdef SMALL_KERNEL
+/*
+ * The idea of adding code in a small kernel might look absurd, but this is
+ * instead of macros.
+ */
+struct mbuf *
+_sk_mget(int how, int type)
+{
+ struct mbuf *m;
+ _MGET(m, how, type);
+ return m;
+}
+
+struct mbuf *
+_sk_mgethdr(int how, int type)
+{
+ struct mbuf *m;
+ _MGETHDR(m, how, type);
+ return m;
+}
+
+void
+_sk_mclget(struct mbuf *m, int how)
+{
+ _MCLGET(m, how);
+}
+#endif /* SMALL_KERNEL */ \ No newline at end of file