Skip to content

Commit fff2dd2

Browse files
committed
extmod/modlwip: Mark some lwip_socket_obj_t's fields as volatile.
Any fields changed by asynchronous callbacks must be volatile.
1 parent a63d4a6 commit fff2dd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extmod/modlwip.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,11 @@ static const int error_lookup_table[] = {
183183
typedef struct _lwip_socket_obj_t {
184184
mp_obj_base_t base;
185185

186-
union {
186+
volatile union {
187187
struct tcp_pcb *tcp;
188188
struct udp_pcb *udp;
189189
} pcb;
190-
union {
190+
volatile union {
191191
struct pbuf *pbuf;
192192
struct tcp_pcb *connection;
193193
} incoming;

0 commit comments

Comments
 (0)