diff --git a/net/route/fileroute.h b/net/route/fileroute.h index 3eb5f29d86..454aaa6542 100644 --- a/net/route/fileroute.h +++ b/net/route/fileroute.h @@ -46,25 +46,6 @@ struct file; /* Forward reference */ -/**************************************************************************** - * Name: net_init_fileroute - * - * Description: - * Initialize the in-memory, RAM routing table - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - * Assumptions: - * Called early in initialization so that no special protection is needed. - * - ****************************************************************************/ - -void net_init_fileroute(void); - /**************************************************************************** * Name: net_openroute_ipv4/net_openroute_ipv6 * diff --git a/net/route/net_fileroute.c b/net/route/net_fileroute.c index 739c0fd8cd..e9ff85a212 100644 --- a/net/route/net_fileroute.c +++ b/net/route/net_fileroute.c @@ -56,7 +56,7 @@ #ifdef CONFIG_ROUTE_IPv4_FILEROUTE /* Semaphore used to lock a routing table for exclusive write-only access */ -static sem_t g_ipv4_exclsem; +static sem_t g_ipv4_exclsem = SEM_INITIALIZER(1); static pid_t g_ipv4_holder = NO_HOLDER; static int g_ipv4_count; #endif @@ -64,7 +64,7 @@ static int g_ipv4_count; #ifdef CONFIG_ROUTE_IPv6_FILEROUTE /* Semaphore used to lock a routing table for exclusive write-only access */ -static sem_t g_ipv6_exclsem; +static sem_t g_ipv6_exclsem = SEM_INITIALIZER(1); static pid_t g_ipv6_holder = NO_HOLDER; static int g_ipv6_count; #endif @@ -180,36 +180,6 @@ int net_routesize(FAR const char *path, size_t entrysize) * Public Functions ****************************************************************************/ -/**************************************************************************** - * Name: net_init_fileroute - * - * Description: - * Initialize the in-memory, RAM routing table - * - * Input Parameters: - * None - * - * Returned Value: - * None - * - * Assumptions: - * Called early in initialization so that no special protection is needed. - * - ****************************************************************************/ - -void net_init_fileroute(void) -{ - /* Initialize semaphores */ - -#ifdef CONFIG_ROUTE_IPv4_FILEROUTE - nxsem_init(&g_ipv4_exclsem, 0, 1); -#endif - -#ifdef CONFIG_ROUTE_IPv6_FILEROUTE - nxsem_init(&g_ipv6_exclsem, 0, 1); -#endif -} - /**************************************************************************** * Name: net_openroute_ipv4/net_openroute_ipv6 * diff --git a/net/route/net_initroute.c b/net/route/net_initroute.c index be66f3a0b1..7af4464b19 100644 --- a/net/route/net_initroute.c +++ b/net/route/net_initroute.c @@ -25,7 +25,6 @@ #include #include "route/ramroute.h" -#include "route/fileroute.h" #include "route/cacheroute.h" #include "route/route.h" @@ -55,10 +54,6 @@ void net_init_route(void) net_init_ramroute(); #endif -#if defined(CONFIG_ROUTE_IPv4_FILEROUTE) || defined(CONFIG_ROUTE_IPv6_FILEROUTE) - net_init_fileroute(); -#endif - #if defined(CONFIG_ROUTE_IPv4_CACHEROUTE) || defined(CONFIG_ROUTE_IPv6_CACHEROUTE) net_init_cacheroute(); #endif