diff --git a/components/net/lwip-1.4.1/src/arch/include/arch/cc.h b/components/net/lwip-1.4.1/src/arch/include/arch/cc.h index a153658d27..82387b432d 100644 --- a/components/net/lwip-1.4.1/src/arch/include/arch/cc.h +++ b/components/net/lwip-1.4.1/src/arch/include/arch/cc.h @@ -100,8 +100,8 @@ void sys_arch_assert(const char* file, int line); #define LWIP_PLATFORM_DIAG(x) do {rt_kprintf x;} while(0) #define LWIP_PLATFORM_ASSERT(x) do {rt_kprintf(x); sys_arch_assert(__FILE__, __LINE__);}while(0) -#define SYS_ARCH_DECL_PROTECT(level) -#define SYS_ARCH_PROTECT(level) rt_enter_critical() -#define SYS_ARCH_UNPROTECT(level) rt_exit_critical() +#define SYS_ARCH_DECL_PROTECT(level) register rt_base_t level +#define SYS_ARCH_PROTECT(level) do {level = rt_hw_interrupt_disable();} while(0) +#define SYS_ARCH_UNPROTECT(level) do {rt_hw_interrupt_enable(level);} while(0) #endif /* __ARCH_CC_H__ */ diff --git a/components/net/lwip-2.0.2/src/arch/include/arch/cc.h b/components/net/lwip-2.0.2/src/arch/include/arch/cc.h index 95062441cf..28f86d257e 100644 --- a/components/net/lwip-2.0.2/src/arch/include/arch/cc.h +++ b/components/net/lwip-2.0.2/src/arch/include/arch/cc.h @@ -91,8 +91,8 @@ void sys_arch_assert(const char* file, int line); #define LWIP_PLATFORM_DIAG(x) do {rt_kprintf x;} while(0) #define LWIP_PLATFORM_ASSERT(x) do {rt_kprintf(x); sys_arch_assert(__FILE__, __LINE__);}while(0) -#define SYS_ARCH_DECL_PROTECT(level) -#define SYS_ARCH_PROTECT(level) rt_enter_critical() -#define SYS_ARCH_UNPROTECT(level) rt_exit_critical() +#define SYS_ARCH_DECL_PROTECT(level) register rt_base_t level +#define SYS_ARCH_PROTECT(level) do {level = rt_hw_interrupt_disable();} while(0) +#define SYS_ARCH_UNPROTECT(level) do {rt_hw_interrupt_enable(level);} while(0) #endif /* __ARCH_CC_H__ */ diff --git a/components/net/lwip-2.1.2/src/arch/include/arch/cc.h b/components/net/lwip-2.1.2/src/arch/include/arch/cc.h index 95062441cf..28f86d257e 100644 --- a/components/net/lwip-2.1.2/src/arch/include/arch/cc.h +++ b/components/net/lwip-2.1.2/src/arch/include/arch/cc.h @@ -91,8 +91,8 @@ void sys_arch_assert(const char* file, int line); #define LWIP_PLATFORM_DIAG(x) do {rt_kprintf x;} while(0) #define LWIP_PLATFORM_ASSERT(x) do {rt_kprintf(x); sys_arch_assert(__FILE__, __LINE__);}while(0) -#define SYS_ARCH_DECL_PROTECT(level) -#define SYS_ARCH_PROTECT(level) rt_enter_critical() -#define SYS_ARCH_UNPROTECT(level) rt_exit_critical() +#define SYS_ARCH_DECL_PROTECT(level) register rt_base_t level +#define SYS_ARCH_PROTECT(level) do {level = rt_hw_interrupt_disable();} while(0) +#define SYS_ARCH_UNPROTECT(level) do {rt_hw_interrupt_enable(level);} while(0) #endif /* __ARCH_CC_H__ */