add helper macro to determine the LwIP error code for the current task
This commit is contained in:
parent
926f90fc4f
commit
8d7dd29b10
2 changed files with 7 additions and 1 deletions
|
@ -81,5 +81,5 @@ typedef size_t mem_ptr_t;
|
|||
|
||||
#define LWIP_PLATFORM_ASSERT(x) do {kprintf("Assertion \"%s\" failed at line %d in %s\n", \
|
||||
x, __LINE__, __FILE__); abort();} while(0)
|
||||
|
||||
|
||||
#endif /* __ARCH_CC_H__ */
|
||||
|
|
|
@ -43,4 +43,10 @@ static inline void sys_arch_unprotect(sys_prot_t pval)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/* define errno to determine error code */
|
||||
#ifdef CONFIG_LWIP
|
||||
#define ERRNO
|
||||
#define errno per_core(current_task)->lwip_err
|
||||
#endif
|
||||
|
||||
#endif /* __ARCH_SYS_ARCH_H__ */
|
||||
|
|
Loading…
Add table
Reference in a new issue