summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-09-09 11:58:50 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-09-09 11:58:50 +0000
commitd12e00bdd6ffbb39ab5d45d5d5a484d293108021 (patch)
treea5ac9dcc5be841e9edff869055b73651f525072c
parent712b9f5349a81fe56fa060ccb8aa13e0db830657 (diff)
downloadnuttx-d12e00bdd6ffbb39ab5d45d5d5a484d293108021.tar.gz
nuttx-d12e00bdd6ffbb39ab5d45d5d5a484d293108021.tar.bz2
nuttx-d12e00bdd6ffbb39ab5d45d5d5a484d293108021.zip
Added network init; refactored some header files
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@338 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--nuttx/arch/pjrc-8051/src/up_allocateheap.c1
-rw-r--r--nuttx/arch/sim/src/up_head.c2
-rw-r--r--nuttx/configs/ntosd-dm320/defconfig2
-rw-r--r--nuttx/configs/pjrc-8051/defconfig2
-rw-r--r--nuttx/examples/ostest/dev_null.c1
-rw-r--r--nuttx/examples/ostest/main.c2
-rw-r--r--nuttx/include/nuttx/clock.h (renamed from nuttx/include/nuttx/os_external.h)29
-rw-r--r--nuttx/include/nuttx/init.h83
-rw-r--r--nuttx/include/nuttx/mm.h83
-rw-r--r--nuttx/include/nuttx/net.h2
-rw-r--r--nuttx/lib/lib_init.c2
-rw-r--r--nuttx/mm/mm_environment.h2
-rw-r--r--nuttx/net/net-dsec2timeval.c1
-rw-r--r--nuttx/net/net-internal.h2
-rw-r--r--nuttx/net/net-sockets.c9
-rw-r--r--nuttx/net/net-timeo.c2
-rw-r--r--nuttx/net/net-timeval2dsec.c1
-rw-r--r--nuttx/net/recvfrom.c1
-rw-r--r--nuttx/sched/clock_internal.h2
-rw-r--r--nuttx/sched/mq_descreate.c1
-rw-r--r--nuttx/sched/mq_getattr.c1
-rw-r--r--nuttx/sched/mq_rcvinternal.c1
-rw-r--r--nuttx/sched/os_internal.h1
-rw-r--r--nuttx/sched/os_start.c15
-rw-r--r--nuttx/sched/pthread_setschedprio.c1
-rw-r--r--nuttx/sched/sched_free.c1
-rw-r--r--nuttx/sched/sched_getprioritymax.c1
-rw-r--r--nuttx/sched/sched_getprioritymin.c1
-rw-r--r--nuttx/sched/sched_getscheduler.c1
-rw-r--r--nuttx/sched/sched_rrgetinterval.c1
-rw-r--r--nuttx/sched/sched_setparam.c1
-rw-r--r--nuttx/sched/sched_setscheduler.c1
-rw-r--r--nuttx/sched/sched_yield.c1
-rw-r--r--nuttx/sched/sig_internal.h1
-rw-r--r--nuttx/sched/sig_procmask.c1
-rw-r--r--nuttx/sched/sig_releasependingsignal.c1
-rw-r--r--nuttx/sched/sig_removependingsignal.c1
-rw-r--r--nuttx/sched/task_delete.c1
-rw-r--r--nuttx/sched/task_restart.c1
39 files changed, 208 insertions, 55 deletions
diff --git a/nuttx/arch/pjrc-8051/src/up_allocateheap.c b/nuttx/arch/pjrc-8051/src/up_allocateheap.c
index 745cadb60..6ef1a77da 100644
--- a/nuttx/arch/pjrc-8051/src/up_allocateheap.c
+++ b/nuttx/arch/pjrc-8051/src/up_allocateheap.c
@@ -42,6 +42,7 @@
#include <sched.h>
#include <debug.h>
#include <nuttx/arch.h>
+#include <nuttx/mm.h>
#include "os_internal.h"
#include "up_internal.h"
#include "up_mem.h"
diff --git a/nuttx/arch/sim/src/up_head.c b/nuttx/arch/sim/src/up_head.c
index 1fc705b5b..e095deb7c 100644
--- a/nuttx/arch/sim/src/up_head.c
+++ b/nuttx/arch/sim/src/up_head.c
@@ -42,7 +42,7 @@
#include <stdlib.h>
#include <setjmp.h>
#include <assert.h>
-#include <nuttx/os_external.h>
+#include <nuttx/init.h>
#include <nuttx/arch.h>
/************************************************************
diff --git a/nuttx/configs/ntosd-dm320/defconfig b/nuttx/configs/ntosd-dm320/defconfig
index 36a3b8f46..abbae5f57 100644
--- a/nuttx/configs/ntosd-dm320/defconfig
+++ b/nuttx/configs/ntosd-dm320/defconfig
@@ -268,7 +268,7 @@ CONFIG_PREALLOC_TIMERS=8
# CONFIG_NET_LLH_LEN - The link level header length
# CONFIG_NET_EXTERNAL_BUFFER - Incoming packet buffer (uip_buf) is defined externally
# CONFIG_NET_FWCACHE_SIZE - number of packets to remember when looking for duplicates
-CONFIG_NET=y
+CONFIG_NET=n
CONFIG_NET_IPv6=n
CONFIG_NSOCKET_DESCRIPTORS=0
CONFIG_NET_MAX_CONNECTIONS=40
diff --git a/nuttx/configs/pjrc-8051/defconfig b/nuttx/configs/pjrc-8051/defconfig
index 513ce74e0..10024fd2b 100644
--- a/nuttx/configs/pjrc-8051/defconfig
+++ b/nuttx/configs/pjrc-8051/defconfig
@@ -256,7 +256,7 @@ CONFIG_PREALLOC_TIMERS=0
# CONFIG_NET_LLH_LEN - The link level header length
# CONFIG_NET_EXTERNAL_BUFFER - Incoming packet buffer (uip_buf) is defined externally
# CONFIG_NET_FWCACHE_SIZE - number of packets to remember when looking for duplicates
-CONFIG_NET=y
+CONFIG_NET=n
CONFIG_NET_IPv6=n
CONFIG_NSOCKET_DESCRIPTORS=0
CONFIG_NET_MAX_CONNECTIONS=40
diff --git a/nuttx/examples/ostest/dev_null.c b/nuttx/examples/ostest/dev_null.c
index 55f6b0c25..57776b495 100644
--- a/nuttx/examples/ostest/dev_null.c
+++ b/nuttx/examples/ostest/dev_null.c
@@ -45,7 +45,6 @@
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
-#include <nuttx/os_external.h>
#include "ostest.h"
/************************************************************
diff --git a/nuttx/examples/ostest/main.c b/nuttx/examples/ostest/main.c
index b7f0afbf3..0a44de78d 100644
--- a/nuttx/examples/ostest/main.c
+++ b/nuttx/examples/ostest/main.c
@@ -47,7 +47,7 @@
#include <unistd.h>
#include <string.h>
#include <sched.h>
-#include <nuttx/os_external.h>
+#include <nuttx/init.h>
#include "ostest.h"
/************************************************************
diff --git a/nuttx/include/nuttx/os_external.h b/nuttx/include/nuttx/clock.h
index 410cdd622..b57b8e4f8 100644
--- a/nuttx/include/nuttx/os_external.h
+++ b/nuttx/include/nuttx/clock.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * os_external.h
+ * nuttx/clock.h
*
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -33,16 +33,14 @@
*
****************************************************************************/
-#ifndef __OS_EXTERNAL_H
-#define __OS_EXTERNAL_H
+#ifndef __NUTTX_CLOCK_H
+#define __NUTTX_CLOCK_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
-#include <pthread.h>
-#include <nuttx/compiler.h>
/****************************************************************************
* Definitions
@@ -115,28 +113,9 @@ extern "C" {
#define EXTERN extern
#endif
-/* These are functions that must be supplied by the application */
-
-EXTERN void weak_function user_initialize(void);
-EXTERN int user_start(int argc, char *argv[]);
-
-/* Functions contained in os_task.c *****************************************/
-
-EXTERN void os_start(void); /* OS entry point called by boot logic */
-
-/* Functions contained in mm_initialize.c ***********************************/
-
-EXTERN void mm_initialize(FAR void *heap_start, size_t heap_size);
-EXTERN void mm_addregion(FAR void *heapstart, size_t heapsize);
-
-/* Functions contained in mm_sem.c ******************************************/
-
-EXTERN int mm_trysemaphore(void);
-EXTERN void mm_givesemaphore(void);
-
#undef EXTERN
#ifdef __cplusplus
}
#endif
-#endif /* __OS_EXTERNAL_H */
+#endif /* __NUTTX_CLOCK_H */
diff --git a/nuttx/include/nuttx/init.h b/nuttx/include/nuttx/init.h
new file mode 100644
index 000000000..e8fdcaf8c
--- /dev/null
+++ b/nuttx/include/nuttx/init.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+ * nuttx/init.h
+ *
+ * Copyright (C) 2007 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name Gregory Nutt nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+#ifndef __NUTTX_INIT_H
+#define __NUTTX_INIT_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <nuttx/compiler.h>
+
+/****************************************************************************
+ * Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Global Data
+ ****************************************************************************/
+
+/****************************************************************************
+ * Global Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Global Function Prototypes
+ ****************************************************************************/
+
+#ifdef __cplusplus
+#define EXTERN extern "C"
+extern "C" {
+#else
+#define EXTERN extern
+#endif
+
+/* These are functions that must be supplied by the application */
+
+EXTERN void weak_function user_initialize(void);
+EXTERN int user_start(int argc, char *argv[]);
+
+/* Functions contained in os_task.c *****************************************/
+
+EXTERN void os_start(void); /* OS entry point called by boot logic */
+
+#undef EXTERN
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __NUTTX_INIT_H */
diff --git a/nuttx/include/nuttx/mm.h b/nuttx/include/nuttx/mm.h
new file mode 100644
index 000000000..8b537a570
--- /dev/null
+++ b/nuttx/include/nuttx/mm.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+ * nuttx/mm.h
+ *
+ * Copyright (C) 2007 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name Gregory Nutt nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+#ifndef __NUTTX_MM_H
+#define __NUTTX_MM_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+/****************************************************************************
+ * Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Global Data
+ ****************************************************************************/
+
+/****************************************************************************
+ * Global Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Global Function Prototypes
+ ****************************************************************************/
+
+#ifdef __cplusplus
+#define EXTERN extern "C"
+extern "C" {
+#else
+#define EXTERN extern
+#endif
+
+/* Functions contained in mm_initialize.c ***********************************/
+
+EXTERN void mm_initialize(FAR void *heap_start, size_t heap_size);
+EXTERN void mm_addregion(FAR void *heapstart, size_t heapsize);
+
+/* Functions contained in mm_sem.c ******************************************/
+
+EXTERN int mm_trysemaphore(void);
+EXTERN void mm_givesemaphore(void);
+
+#undef EXTERN
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __NUTTX_MM_H */
diff --git a/nuttx/include/nuttx/net.h b/nuttx/include/nuttx/net.h
index 39596b76a..2f700a985 100644
--- a/nuttx/include/nuttx/net.h
+++ b/nuttx/include/nuttx/net.h
@@ -45,7 +45,6 @@
#include <semaphore.h>
-#include <nuttx/os_external.h>
#include <net/uip/uip.h>
#include <net/uip/psock.h>
@@ -126,6 +125,7 @@ extern "C" {
/* net_sockets.c *************************************************************/
+EXTERN void weak_function net_initialize(void);
EXTERN FAR struct socketlist *net_alloclist(void);
EXTERN int net_addreflist(FAR struct socketlist *list);
EXTERN int net_releaselist(FAR struct socketlist *list);
diff --git a/nuttx/lib/lib_init.c b/nuttx/lib/lib_init.c
index 8bf872c55..e071d68ae 100644
--- a/nuttx/lib/lib_init.c
+++ b/nuttx/lib/lib_init.c
@@ -42,7 +42,7 @@
#include <errno.h>
#include <nuttx/kmalloc.h>
#include <nuttx/fs.h>
-#include <nuttx/os_external.h>
+#include <nuttx/lib.h>
#include "lib_internal.h"
/************************************************************
diff --git a/nuttx/mm/mm_environment.h b/nuttx/mm/mm_environment.h
index 8777323b0..0d315e8ef 100644
--- a/nuttx/mm/mm_environment.h
+++ b/nuttx/mm/mm_environment.h
@@ -54,7 +54,7 @@
# include <debug.h>
# include <errno.h>
# include <assert.h>
-# include <nuttx/os_external.h>
+# include <nuttx/mm.h>
#else
# include <sys/types.h>
# include <string.h>
diff --git a/nuttx/net/net-dsec2timeval.c b/nuttx/net/net-dsec2timeval.c
index d9b81b436..0ff1ab2c2 100644
--- a/nuttx/net/net-dsec2timeval.c
+++ b/nuttx/net/net-dsec2timeval.c
@@ -43,6 +43,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <errno.h>
+#include <nuttx/clock.h>
#include "net-internal.h"
diff --git a/nuttx/net/net-internal.h b/nuttx/net/net-internal.h
index 9f7fcaea0..b62099a16 100644
--- a/nuttx/net/net-internal.h
+++ b/nuttx/net/net-internal.h
@@ -43,6 +43,7 @@
#include <nuttx/config.h>
#ifdef CONFIG_NET
+#include <time.h>
#include <nuttx/net.h>
#include "net-internal.h"
@@ -115,7 +116,6 @@ extern "C" {
/* net-sockets.c *************************************************************/
-EXTERN void weak_function net_initialize(void);
EXTERN int sockfd_allocate(void);
EXTERN void sockfd_release(int sockfd);
EXTERN FAR struct socket *sockfd_socket(int sockfd);
diff --git a/nuttx/net/net-sockets.c b/nuttx/net/net-sockets.c
index 0d3b39a23..3a6821051 100644
--- a/nuttx/net/net-sockets.c
+++ b/nuttx/net/net-sockets.c
@@ -38,13 +38,17 @@
****************************************************************************/
#include <nuttx/config.h>
+
#include <string.h>
#include <semaphore.h>
#include <assert.h>
#include <sched.h>
#include <errno.h>
+
+#include <net/uip/uip.h>
#include <nuttx/net.h>
#include <nuttx/kmalloc.h>
+
#include "net-internal.h"
/****************************************************************************
@@ -91,6 +95,11 @@ static void _net_semtake(FAR struct socketlist *list)
void net_initialize(void)
{
+ /* Initialize the uIP layer */
+
+ uip_init();
+
+ /* Initialize the socket lay -- nothing to do */
}
/* Allocate a list of files for a new task */
diff --git a/nuttx/net/net-timeo.c b/nuttx/net/net-timeo.c
index 930bf946d..65161ca1d 100644
--- a/nuttx/net/net-timeo.c
+++ b/nuttx/net/net-timeo.c
@@ -41,7 +41,7 @@
#if defined(CONFIG_NET) && defined(CONFIG_NET_SOCKOPTS) && !defined(CONFIG_DISABLE_CLOCK)
#include <sys/types.h>
-#include <nuttx/os_external.h>
+#include <nuttx/clock.h>
#include "net-internal.h"
/****************************************************************************
diff --git a/nuttx/net/net-timeval2dsec.c b/nuttx/net/net-timeval2dsec.c
index 401d8bcee..eb68fc4e5 100644
--- a/nuttx/net/net-timeval2dsec.c
+++ b/nuttx/net/net-timeval2dsec.c
@@ -43,6 +43,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <errno.h>
+#include <nuttx/clock.h>
#include "net-internal.h"
diff --git a/nuttx/net/recvfrom.c b/nuttx/net/recvfrom.c
index d4a1898c9..318f0d1bf 100644
--- a/nuttx/net/recvfrom.c
+++ b/nuttx/net/recvfrom.c
@@ -45,6 +45,7 @@
#include <string.h>
#include <errno.h>
#include <arch/irq.h>
+#include <nuttx/clock.h>
#include "net-internal.h"
diff --git a/nuttx/sched/clock_internal.h b/nuttx/sched/clock_internal.h
index 2b1346880..3c394520c 100644
--- a/nuttx/sched/clock_internal.h
+++ b/nuttx/sched/clock_internal.h
@@ -42,7 +42,7 @@
#include <nuttx/config.h>
#include <sys/types.h>
-#include <nuttx/os_external.h>
+#include <nuttx/clock.h>
#include <nuttx/compiler.h>
/********************************************************************************
diff --git a/nuttx/sched/mq_descreate.c b/nuttx/sched/mq_descreate.c
index 98026ad19..69ddf999c 100644
--- a/nuttx/sched/mq_descreate.c
+++ b/nuttx/sched/mq_descreate.c
@@ -45,7 +45,6 @@
#include <sched.h>
#include <debug.h>
#include <nuttx/arch.h>
-#include <nuttx/os_external.h>
#include "os_internal.h"
#include "sig_internal.h"
diff --git a/nuttx/sched/mq_getattr.c b/nuttx/sched/mq_getattr.c
index 52292410e..71f2a87df 100644
--- a/nuttx/sched/mq_getattr.c
+++ b/nuttx/sched/mq_getattr.c
@@ -47,7 +47,6 @@
#include <debug.h>
#include <nuttx/kmalloc.h>
#include <nuttx/arch.h>
-#include <nuttx/os_external.h>
#include "os_internal.h"
#include "sig_internal.h"
#include "mq_internal.h"
diff --git a/nuttx/sched/mq_rcvinternal.c b/nuttx/sched/mq_rcvinternal.c
index dcbfc0b31..853ac0bc1 100644
--- a/nuttx/sched/mq_rcvinternal.c
+++ b/nuttx/sched/mq_rcvinternal.c
@@ -46,7 +46,6 @@
#include <sched.h>
#include <debug.h>
#include <nuttx/arch.h>
-#include <nuttx/os_external.h>
#include "os_internal.h"
#include "mq_internal.h"
diff --git a/nuttx/sched/os_internal.h b/nuttx/sched/os_internal.h
index 94da9bbbc..a54157cd8 100644
--- a/nuttx/sched/os_internal.h
+++ b/nuttx/sched/os_internal.h
@@ -43,7 +43,6 @@
#include <queue.h>
#include <sched.h>
#include <nuttx/kmalloc.h>
-#include <nuttx/os_external.h>
/************************************************************
* Definitions
diff --git a/nuttx/sched/os_start.c b/nuttx/sched/os_start.c
index c01778295..7591e8878 100644
--- a/nuttx/sched/os_start.c
+++ b/nuttx/sched/os_start.c
@@ -44,8 +44,10 @@
#include <nuttx/arch.h>
#include <nuttx/compiler.h>
#include <nuttx/fs.h>
+#include <nuttx/net.h>
#include <nuttx/lib.h>
-#include <nuttx/os_external.h>
+#include <nuttx/mm.h>
+#include <nuttx/init.h>
#include "os_internal.h"
#include "sig_internal.h"
#include "wd_internal.h"
@@ -387,6 +389,17 @@ void os_start(void)
}
#endif
+ /* Initialize the network system */
+
+#ifdef CONFIG_NET
+#if 0
+ if (net_initialize != NULL)
+#endif
+ {
+ net_initialize();
+ }
+#endif
+
/* The processor specific details of running the operating system
* will be handled here. Such things as setting up interrupt
* service routines and starting the clock are some of the things
diff --git a/nuttx/sched/pthread_setschedprio.c b/nuttx/sched/pthread_setschedprio.c
index 8ff86a924..d5a5705dc 100644
--- a/nuttx/sched/pthread_setschedprio.c
+++ b/nuttx/sched/pthread_setschedprio.c
@@ -42,7 +42,6 @@
#include <sched.h>
#include <errno.h>
#include <nuttx/arch.h>
-#include <nuttx/os_external.h>
#include "os_internal.h"
/****************************************************************************
diff --git a/nuttx/sched/sched_free.c b/nuttx/sched/sched_free.c
index ec2688c57..6078cc1b6 100644
--- a/nuttx/sched/sched_free.c
+++ b/nuttx/sched/sched_free.c
@@ -42,6 +42,7 @@
#include <queue.h>
#include <assert.h>
#include <nuttx/arch.h>
+#include <nuttx/mm.h>
#include "os_internal.h"
/************************************************************
diff --git a/nuttx/sched/sched_getprioritymax.c b/nuttx/sched/sched_getprioritymax.c
index f137b72c6..6c1125c07 100644
--- a/nuttx/sched/sched_getprioritymax.c
+++ b/nuttx/sched/sched_getprioritymax.c
@@ -40,7 +40,6 @@
#include <nuttx/config.h>
#include <sys/types.h>
#include <nuttx/arch.h>
-#include <nuttx/os_external.h>
#include "os_internal.h"
/************************************************************
diff --git a/nuttx/sched/sched_getprioritymin.c b/nuttx/sched/sched_getprioritymin.c
index 154432c66..e8b62a5f8 100644
--- a/nuttx/sched/sched_getprioritymin.c
+++ b/nuttx/sched/sched_getprioritymin.c
@@ -40,7 +40,6 @@
#include <nuttx/config.h>
#include <sys/types.h>
#include <nuttx/arch.h>
-#include <nuttx/os_external.h>
#include "os_internal.h"
/************************************************************
diff --git a/nuttx/sched/sched_getscheduler.c b/nuttx/sched/sched_getscheduler.c
index ae9739185..8eea5339e 100644
--- a/nuttx/sched/sched_getscheduler.c
+++ b/nuttx/sched/sched_getscheduler.c
@@ -42,7 +42,6 @@
#include <sched.h>
#include <errno.h>
#include <nuttx/arch.h>
-#include <nuttx/os_external.h>
#include "os_internal.h"
/************************************************************
diff --git a/nuttx/sched/sched_rrgetinterval.c b/nuttx/sched/sched_rrgetinterval.c
index 8e0ca2824..ee4d4aea9 100644
--- a/nuttx/sched/sched_rrgetinterval.c
+++ b/nuttx/sched/sched_rrgetinterval.c
@@ -42,7 +42,6 @@
#include <sched.h>
#include <errno.h>
#include <nuttx/arch.h>
-#include <nuttx/os_external.h>
#include "os_internal.h"
#include "clock_internal.h"
diff --git a/nuttx/sched/sched_setparam.c b/nuttx/sched/sched_setparam.c
index 09b834873..e5a61c856 100644
--- a/nuttx/sched/sched_setparam.c
+++ b/nuttx/sched/sched_setparam.c
@@ -42,7 +42,6 @@
#include <sched.h>
#include <errno.h>
#include <nuttx/arch.h>
-#include <nuttx/os_external.h>
#include "os_internal.h"
/************************************************************
diff --git a/nuttx/sched/sched_setscheduler.c b/nuttx/sched/sched_setscheduler.c
index 4d4978a62..7fee93118 100644
--- a/nuttx/sched/sched_setscheduler.c
+++ b/nuttx/sched/sched_setscheduler.c
@@ -43,7 +43,6 @@
#include <sched.h>
#include <errno.h>
#include <nuttx/arch.h>
-#include <nuttx/os_external.h>
#include "os_internal.h"
#include "clock_internal.h"
diff --git a/nuttx/sched/sched_yield.c b/nuttx/sched/sched_yield.c
index ae4db7178..edbb00abc 100644
--- a/nuttx/sched/sched_yield.c
+++ b/nuttx/sched/sched_yield.c
@@ -40,7 +40,6 @@
#include <nuttx/config.h>
#include <sys/types.h>
#include <nuttx/arch.h>
-#include <nuttx/os_external.h>
#include "os_internal.h"
/************************************************************
diff --git a/nuttx/sched/sig_internal.h b/nuttx/sched/sig_internal.h
index 8ae975e42..93dee0904 100644
--- a/nuttx/sched/sig_internal.h
+++ b/nuttx/sched/sig_internal.h
@@ -44,7 +44,6 @@
#include <queue.h>
#include <sched.h>
#include <nuttx/kmalloc.h>
-#include <nuttx/os_external.h>
/************************************************************
* Definitions
diff --git a/nuttx/sched/sig_procmask.c b/nuttx/sched/sig_procmask.c
index 339e6dda5..2451f830d 100644
--- a/nuttx/sched/sig_procmask.c
+++ b/nuttx/sched/sig_procmask.c
@@ -47,7 +47,6 @@
#include <sched.h>
#include <nuttx/kmalloc.h>
#include <nuttx/arch.h>
-#include <nuttx/os_external.h>
#include "os_internal.h"
#include "sig_internal.h"
diff --git a/nuttx/sched/sig_releasependingsignal.c b/nuttx/sched/sig_releasependingsignal.c
index 198c145df..0c5a74595 100644
--- a/nuttx/sched/sig_releasependingsignal.c
+++ b/nuttx/sched/sig_releasependingsignal.c
@@ -47,7 +47,6 @@
#include <sched.h>
#include <nuttx/kmalloc.h>
#include <nuttx/arch.h>
-#include <nuttx/os_external.h>
#include "os_internal.h"
#include "sig_internal.h"
diff --git a/nuttx/sched/sig_removependingsignal.c b/nuttx/sched/sig_removependingsignal.c
index c31c0bbe7..7ee9752fc 100644
--- a/nuttx/sched/sig_removependingsignal.c
+++ b/nuttx/sched/sig_removependingsignal.c
@@ -47,7 +47,6 @@
#include <sched.h>
#include <nuttx/kmalloc.h>
#include <nuttx/arch.h>
-#include <nuttx/os_external.h>
#include "os_internal.h"
#include "sig_internal.h"
diff --git a/nuttx/sched/task_delete.c b/nuttx/sched/task_delete.c
index 86a796ab7..691b7c57e 100644
--- a/nuttx/sched/task_delete.c
+++ b/nuttx/sched/task_delete.c
@@ -41,7 +41,6 @@
#include <sys/types.h>
#include <sched.h>
-#include <nuttx/os_external.h>
#include "os_internal.h"
#ifndef CONFIG_DISABLE_SIGNALS
# include "sig_internal.h"
diff --git a/nuttx/sched/task_restart.c b/nuttx/sched/task_restart.c
index 399bcb6e5..3d682eb3d 100644
--- a/nuttx/sched/task_restart.c
+++ b/nuttx/sched/task_restart.c
@@ -41,7 +41,6 @@
#include <sys/types.h>
#include <sched.h>
#include <nuttx/arch.h>
-#include <nuttx/os_external.h>
#include "os_internal.h"
#include "sig_internal.h"