net: Remove net_lockinitialize

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-03-12 12:14:11 +08:00 committed by Petro Karashchenko
parent 1a7f49eeb3
commit 9c1fc8da4e
3 changed files with 3 additions and 31 deletions

View File

@ -47,7 +47,6 @@
#include "igmp/igmp.h"
#include "route/route.h"
#include "usrsock/usrsock.h"
#include "utils/utils.h"
/****************************************************************************
* Public Functions
@ -78,10 +77,6 @@
void net_initialize(void)
{
/* Initialize the locking facility */
net_lockinitialize();
#ifdef CONFIG_NET_IPv6
#ifdef CONFIG_NET_6LOWPAN
/* Initialize 6LoWPAN data structures */

View File

@ -49,9 +49,9 @@
* Private Data
****************************************************************************/
static sem_t g_netlock;
static pid_t g_holder = NO_HOLDER;
static unsigned int g_count = 0;
static sem_t g_netlock = SEM_INITIALIZER(1);
static pid_t g_holder = NO_HOLDER;
static unsigned int g_count;
/****************************************************************************
* Private Functions
@ -149,19 +149,6 @@ _net_timedwait(sem_t *sem, bool interruptible, unsigned int timeout)
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: net_lockinitialize
*
* Description:
* Initialize the locking facility
*
****************************************************************************/
void net_lockinitialize(void)
{
nxsem_init(&g_netlock, 0, 1);
}
/****************************************************************************
* Name: net_lock
*

View File

@ -61,16 +61,6 @@ extern "C"
struct net_driver_s; /* Forward reference */
struct timeval; /* Forward reference */
/****************************************************************************
* Name: net_lockinitialize
*
* Description:
* Initialize the locking facility
*
****************************************************************************/
void net_lockinitialize(void);
/****************************************************************************
* Name: net_breaklock
*