From ed1a88e26380de240f9018984d4291ba57a2f52a Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 27 Feb 2019 10:27:56 +1100 Subject: [PATCH] extmod/modlwip: Don't require a port to define concurrency macros. --- extmod/modlwip.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/extmod/modlwip.c b/extmod/modlwip.c index 83104a487f..1b8caa8944 100644 --- a/extmod/modlwip.c +++ b/extmod/modlwip.c @@ -69,6 +69,13 @@ #define ip_reset_option(pcb, opt) ((pcb)->so_options &= ~(opt)) #endif +// A port can define these hooks to provide concurrency protection +#ifndef MICROPY_PY_LWIP_ENTER +#define MICROPY_PY_LWIP_ENTER +#define MICROPY_PY_LWIP_REENTER +#define MICROPY_PY_LWIP_EXIT +#endif + #ifdef MICROPY_PY_LWIP_SLIP #include "netif/slipif.h" #include "lwip/sio.h"