add helper macro to determine the LwIP error code for the current task

This commit is contained in:
Stefan Lankes 2011-08-10 08:20:46 +02:00
parent 926f90fc4f
commit 8d7dd29b10
2 changed files with 7 additions and 1 deletions

View file

@ -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__ */

View file

@ -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__ */