summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-02-27 10:27:56 +1100
committerDamien George <damien.p.george@gmail.com>2019-02-27 10:27:56 +1100
commited1a88e26380de240f9018984d4291ba57a2f52a (patch)
tree2e24ea23e1f3a9d51c63557f9f8ba660c42a4c52
parent12ce9f268909435b49f558d1d3c15ad7591d6fe8 (diff)
extmod/modlwip: Don't require a port to define concurrency macros.
-rw-r--r--extmod/modlwip.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/extmod/modlwip.c b/extmod/modlwip.c
index 83104a487..1b8caa894 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"