Commit f1bd09d
authored
Rollup merge of #157867 - devnexen:condvar_xous_timeout_fix, r=clarfonthey
std: sys: xous: clamp condvar wait_timeout instead of truncating
dur.as_millis() (u128) was cast straight to usize, so on 32-bit xous any timeout over ~49 days truncated, and an exact multiple of 2^32 ms became 0 and then 1ms via the "don't wait forever" guard. Saturate the conversion, matching sys/sync/thread_parking/xous.rs.1 file changed
Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
132 | 130 | | |
133 | 131 | | |
134 | 132 | | |
| |||
0 commit comments