]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/dev/unix_startup.c
xnu-2422.110.17.tar.gz
[apple/xnu.git] / bsd / dev / unix_startup.c
index f167a175236f20923b1a0c304364c26f0a31cb01..0f36920f074e14457e1dfc5db80ed4fbb777d6ce 100644 (file)
@@ -61,7 +61,7 @@ extern uint32_t   tcp_sendspace;
 extern uint32_t   tcp_recvspace;
 #endif
 
-void            bsd_bufferinit(void) __attribute__((section("__TEXT, initcode")));
+void            bsd_bufferinit(void);
 extern void     md_prepare_for_shutdown(int, int, char *);
 
 unsigned int   bsd_mbuf_cluster_reserve(boolean_t *);
@@ -90,13 +90,16 @@ SYSCTL_INT (_kern, OID_AUTO, maxnbuf, CTLFLAG_RW | CTLFLAG_LOCKED, &max_nbuf_hea
 __private_extern__ int customnbuf = 0;
 int             serverperfmode = 0;    /* Flag indicates a server boot when set */
 int             ncl = 0;
+
+#if SOCKETS
 static unsigned int mbuf_poolsz;
+#endif
 
 vm_map_t        buffer_map;
 vm_map_t        bufferhdr_map;
 static int vnodes_sized = 0;
 
-extern void     bsd_startupearly(void) __attribute__((section("__TEXT, initcode")));
+extern void     bsd_startupearly(void);
 
 void
 bsd_startupearly(void)
@@ -157,11 +160,7 @@ bsd_startupearly(void)
 
 #if SOCKETS
        {
-#if CONFIG_USESOCKTHRESHOLD
-               static const unsigned int       maxspace = 64 * 1024;
-#else
                static const unsigned int       maxspace = 128 * 1024;
-#endif
                int             scale;
 
                nmbclusters = bsd_mbuf_cluster_reserve(NULL) / MCLBYTES;
@@ -204,8 +203,9 @@ bsd_startupearly(void)
 void
 bsd_bufferinit(void)
 {
+#if SOCKETS
        kern_return_t   ret;
-
+#endif
        /*
         * Note: Console device initialized in kminit() from bsd_autoconf()
         * prior to call to us in bsd_init().
@@ -239,6 +239,7 @@ bsd_bufferinit(void)
 #endif /* !__LP64__ */
 #define        MAX_NCL         (MAX_MBUF_POOL >> MCLSHIFT)
 
+#if SOCKETS
 /*
  * this has been broken out into a separate routine that
  * can be called from the x86 early vm initialization to
@@ -300,10 +301,11 @@ done:
 
        return (mbuf_poolsz);
 }
+#endif
+
 #if defined(__LP64__)
 extern int tcp_tcbhashsize;
 extern int max_cached_sock_count;
-void IOSleep(int);
 #endif