Skip to content

Commit d16e385

Browse files
committed
pbio/os: Make poll request volatile.
Can be called from interrupt handlers.
1 parent 1710f5e commit d16e385

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/pbio/src/os.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
// Copyright (c) 2025 The Pybricks Authors
33

44
#include <stdbool.h>
5+
#include <stdio.h>
56

67
#include <pbio/os.h>
78
#include <pbio/util.h>
89

9-
#include <stdio.h>
1010
#include <pbdrv/clock.h>
1111

1212
/**
@@ -35,7 +35,7 @@ bool pbio_os_timer_is_expired(pbio_os_timer_t *timer) {
3535
/**
3636
* Whether a poll request is pending.
3737
*/
38-
static bool poll_request_is_pending = false;
38+
static volatile bool poll_request_is_pending = false;
3939

4040
/**
4141
* Request that the event loop polls all processes.

0 commit comments

Comments
 (0)