From fff2dd2627e78fc187b47074436de524db393ac2 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky <pfalcon@users.sourceforge.net> Date: Tue, 29 Dec 2015 21:00:52 +0200 Subject: [PATCH] extmod/modlwip: Mark some lwip_socket_obj_t's fields as volatile. Any fields changed by asynchronous callbacks must be volatile. --- extmod/modlwip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extmod/modlwip.c b/extmod/modlwip.c index afd606729..afe5ca9e7 100644 --- a/extmod/modlwip.c +++ b/extmod/modlwip.c @@ -183,11 +183,11 @@ static const int error_lookup_table[] = { typedef struct _lwip_socket_obj_t { mp_obj_base_t base; - union { + volatile union { struct tcp_pcb *tcp; struct udp_pcb *udp; } pcb; - union { + volatile union { struct pbuf *pbuf; struct tcp_pcb *connection; } incoming; -- GitLab