Commit a6067a3
kernel: reimplement k_uptime_get_32()
The current implementation does not return the low 32 bits of
k_uptime_get() as suggested by it's documentation; it returns the number
of milliseconds represented by the low 32-bits of the underlying system
clock. The truncation before translation results in discontinuities at
every point where the system clock increments bit 33.
Reimplement it using the full-precision value, and update the
documentation to note that this variant has little value for
long-running applications.
Closes #18739.
Signed-off-by: Peter Bigot <[email protected]>1 parent 64841fb commit a6067a3
2 files changed
+12
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1729 | 1729 | | |
1730 | 1730 | | |
1731 | 1731 | | |
1732 | | - | |
1733 | | - | |
| 1732 | + | |
| 1733 | + | |
1734 | 1734 | | |
1735 | | - | |
1736 | | - | |
1737 | | - | |
1738 | | - | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
1739 | 1740 | | |
1740 | 1741 | | |
1741 | 1742 | | |
| |||
1744 | 1745 | | |
1745 | 1746 | | |
1746 | 1747 | | |
1747 | | - | |
| 1748 | + | |
1748 | 1749 | | |
1749 | | - | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
1750 | 1754 | | |
1751 | 1755 | | |
1752 | 1756 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | 232 | | |
245 | 233 | | |
246 | 234 | | |
| |||
0 commit comments