apps/: Replace irqsave() with enter_critical_section(); replace irqrestore() with leave_critical_section()

This commit is contained in:
Gregory Nutt
2016-02-14 15:15:37 -06:00
parent 5642e02f77
commit d5c3bae6cd
2 changed files with 7 additions and 5 deletions

View File

@@ -70,6 +70,7 @@
#include <netinet/in.h>
#include <netinet/ether.h>
#include <nuttx/irq.h>
#include <nuttx/clock.h>
#include <nuttx/net/net.h>
#include <nuttx/net/netdev.h>
@@ -174,9 +175,9 @@ static uint16_t g_pingid = 0;
#if defined(HAVE_PING) || defined(HAVE_PING6)
static uint16_t ping_newid(void)
{
irqstate_t save = irqsave();
irqstate_t save = enter_critical_section();
uint16_t ret = ++g_pingid;
irqrestore(save);
leave_critical_section(save);
return ret;
}
#endif /* HAVE_PING || HAVE_PINg */