mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
net/route: Remove net_init_fileroute
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
7028531e74
commit
19ec0b4fe3
@@ -46,25 +46,6 @@
|
|||||||
|
|
||||||
struct file; /* Forward reference */
|
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
|
* Name: net_openroute_ipv4/net_openroute_ipv6
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
#ifdef CONFIG_ROUTE_IPv4_FILEROUTE
|
#ifdef CONFIG_ROUTE_IPv4_FILEROUTE
|
||||||
/* Semaphore used to lock a routing table for exclusive write-only access */
|
/* 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 pid_t g_ipv4_holder = NO_HOLDER;
|
||||||
static int g_ipv4_count;
|
static int g_ipv4_count;
|
||||||
#endif
|
#endif
|
||||||
@@ -64,7 +64,7 @@ static int g_ipv4_count;
|
|||||||
#ifdef CONFIG_ROUTE_IPv6_FILEROUTE
|
#ifdef CONFIG_ROUTE_IPv6_FILEROUTE
|
||||||
/* Semaphore used to lock a routing table for exclusive write-only access */
|
/* 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 pid_t g_ipv6_holder = NO_HOLDER;
|
||||||
static int g_ipv6_count;
|
static int g_ipv6_count;
|
||||||
#endif
|
#endif
|
||||||
@@ -180,36 +180,6 @@ int net_routesize(FAR const char *path, size_t entrysize)
|
|||||||
* Public Functions
|
* 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
|
* Name: net_openroute_ipv4/net_openroute_ipv6
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#include "route/ramroute.h"
|
#include "route/ramroute.h"
|
||||||
#include "route/fileroute.h"
|
|
||||||
#include "route/cacheroute.h"
|
#include "route/cacheroute.h"
|
||||||
#include "route/route.h"
|
#include "route/route.h"
|
||||||
|
|
||||||
@@ -55,10 +54,6 @@ void net_init_route(void)
|
|||||||
net_init_ramroute();
|
net_init_ramroute();
|
||||||
#endif
|
#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)
|
#if defined(CONFIG_ROUTE_IPv4_CACHEROUTE) || defined(CONFIG_ROUTE_IPv6_CACHEROUTE)
|
||||||
net_init_cacheroute();
|
net_init_cacheroute();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user