Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.2k
Commit592ede7
committed
rp2: Add mutual exclusion for machine.lightsleep().
There's no specified behaviour for what should happen if both CPUs calllightsleep() together, but the latest changes could cause a permanent hangdue to a race in the timer cleanup code. Add a flag to prevent hangs if twothreads accidentally lightsleep, at least.This allows the new lightsleep test to pass on RPI_PICO and RPI_PICO2, andeven have much tighter time deltas. However, the test still fails onwireless boards where the LWIP tick wakes them up too frequently.This work was funded through GitHub Sponsors.Signed-off-by: Angus Gratton <angus@redyak.com.au>1 parente3a6c84 commit592ede7
File tree
2 files changed
+34
-5
lines changed- ports/rp2
- tests/ports/rp2
2 files changed
+34
-5
lines changedLines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
173 | 173 |
| |
174 | 174 |
| |
175 | 175 |
| |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
176 | 186 |
| |
177 | 187 |
| |
178 | 188 |
| |
| |||
320 | 330 |
| |
321 | 331 |
| |
322 | 332 |
| |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
323 | 339 |
| |
324 | 340 |
| |
325 | 341 |
| |
|
Lines changed: 18 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
45 |
| - | |
| 45 | + | |
46 | 46 |
| |
47 |
| - | |
48 |
| - | |
49 |
| - | |
50 |
| - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
51 | 64 |
| |
52 | 65 |
| |
53 | 66 |
| |
|
0 commit comments
Comments
(0)