Commit bec9dcf
committed
zephyr: Make time.sleep() and friends thread safe.
Currently the delay function is using a single static k_poll_event
object which means that multiple threads sleeping at similar times
will try to use the same event variable leading to a eventual crash.
Signed-off-by: Daniel Campora <[email protected]>1 parent 593ae04 commit bec9dcf
2 files changed
+16
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | 32 | | |
41 | 33 | | |
42 | 34 | | |
| |||
46 | 38 | | |
47 | 39 | | |
48 | 40 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
54 | 44 | | |
55 | 45 | | |
56 | 46 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
70 | 52 | | |
71 | | - | |
72 | | - | |
73 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
74 | 58 | | |
75 | | - | |
76 | 59 | | |
77 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
78 | 64 | | |
79 | 65 | | |
80 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 29 | | |
35 | 30 | | |
36 | 31 | | |
| |||
0 commit comments