Lines Matching +full:32 +full:- +full:bit
4 * SPDX-License-Identifier: Apache-2.0
26 /** @brief System-wide macro to denote "forever" in milliseconds
33 #define SYS_FOREVER_MS (-1)
35 /** @brief System-wide macro to denote "forever" in microseconds
39 #define SYS_FOREVER_US (-1)
41 /** @brief System-wide macro to convert milliseconds to kernel timeouts
99 * reduces to 32 bit only if a ratio conversion is available and the
100 * result is 32 bits.
103 * appropriately in a user-facing API. The boolean arguments are:
105 * const_hz - The hz arguments are known to be compile-time
108 * result32 - The result will be truncated to 32 bits on use
109 * round_up - Return the ceiling of the resulting fraction
110 * round_off - Return the nearest value to the resulting fraction
135 (__round_up) ? ((__from_hz) / (__to_hz)) - 1 : \
142 * Some compiler versions emit a divide-by-zero warning for this code:
144 * https://github.com/zephyrproject-rtos/zephyr/issues/63564
145 * https://blog.llvm.org/2011/05/what-every-c-programmer-should-know_21.html
147 * To silence such divide-by-zero warnings, "cheat" and never return
149 * little bit the huge pain of "reverse-engineering" pre-processor
153 * evaluating the same expression twice. However: 1. it's a non-standard
165 (__round_up) ? (__from_hz) - 1 : \
168 /* Integer division 32-bit conversion */
170 ((uint64_t) (__t) <= 0xffffffffU - \
183 /* Integer multiplication 32-bit conversion */
187 /* General 32-bit conversion */
192 /* Integer division 64-bit conversion */
198 /* Integer multiplication 64-bit conversion */
202 /* Fast 64-bit conversion. This relies on the multiply not overflowing */
207 /* Slow 64-bit conversion. This avoids overflowing the multiply */
213 /* General 64-bit conversion. Uses one of the two above macros */
219 /* Convert, generating a 32-bit result */
238 /* Convert, generating a 64-bit result */
266 * Note that nano/microsecond conversions are only defined with 64 bit
267 * precision. These units conversions were not available in 32 bit
268 * variants historically, and doing 32 bit math with units that small
272 * #!/usr/bin/perl -w
294 * my $sz = $big ? 64 : 32;
299 * my $ret32 = $big ? "64" : "32";
309 * print " * Computes result in $sz bit precision.\n";
345 /** @brief Convert seconds to hardware cycles. 32 bits. Truncates.
348 * Computes result in 32 bit precision.
364 * Computes result in 64 bit precision.
377 /** @brief Convert seconds to hardware cycles. 32 bits. Round nearest.
380 * Computes result in 32 bit precision.
396 * Computes result in 64 bit precision.
409 /** @brief Convert seconds to hardware cycles. 32 bits. Rounds up.
412 * Computes result in 32 bit precision.
428 * Computes result in 64 bit precision.
441 /** @brief Convert seconds to ticks. 32 bits. Truncates.
444 * Computes result in 32 bit precision.
460 * Computes result in 64 bit precision.
473 /** @brief Convert seconds to ticks. 32 bits. Round nearest.
476 * Computes result in 32 bit precision.
492 * Computes result in 64 bit precision.
505 /** @brief Convert seconds to ticks. 32 bits. Rounds up.
508 * Computes result in 32 bit precision.
524 * Computes result in 64 bit precision.
537 /** @brief Convert milliseconds to hardware cycles. 32 bits. Truncates.
540 * Computes result in 32 bit precision.
556 * Computes result in 64 bit precision.
569 /** @brief Convert milliseconds to hardware cycles. 32 bits. Round nearest.
572 * Computes result in 32 bit precision.
588 * Computes result in 64 bit precision.
601 /** @brief Convert milliseconds to hardware cycles. 32 bits. Rounds up.
604 * Computes result in 32 bit precision.
620 * Computes result in 64 bit precision.
633 /** @brief Convert milliseconds to ticks. 32 bits. Truncates.
636 * Computes result in 32 bit precision.
652 * Computes result in 64 bit precision.
665 /** @brief Convert milliseconds to ticks. 32 bits. Round nearest.
668 * Computes result in 32 bit precision.
684 * Computes result in 64 bit precision.
697 /** @brief Convert milliseconds to ticks. 32 bits. Rounds up.
700 * Computes result in 32 bit precision.
716 * Computes result in 64 bit precision.
729 /** @brief Convert microseconds to hardware cycles. 32 bits. Truncates.
732 * Computes result in 32 bit precision.
748 * Computes result in 64 bit precision.
761 /** @brief Convert microseconds to hardware cycles. 32 bits. Round nearest.
764 * Computes result in 32 bit precision.
780 * Computes result in 64 bit precision.
793 /** @brief Convert microseconds to hardware cycles. 32 bits. Rounds up.
796 * Computes result in 32 bit precision.
812 * Computes result in 64 bit precision.
825 /** @brief Convert microseconds to ticks. 32 bits. Truncates.
828 * Computes result in 32 bit precision.
844 * Computes result in 64 bit precision.
857 /** @brief Convert microseconds to ticks. 32 bits. Round nearest.
860 * Computes result in 32 bit precision.
876 * Computes result in 64 bit precision.
889 /** @brief Convert microseconds to ticks. 32 bits. Rounds up.
892 * Computes result in 32 bit precision.
908 * Computes result in 64 bit precision.
921 /** @brief Convert nanoseconds to hardware cycles. 32 bits. Truncates.
924 * Computes result in 32 bit precision.
940 * Computes result in 64 bit precision.
953 /** @brief Convert nanoseconds to hardware cycles. 32 bits. Round nearest.
956 * Computes result in 32 bit precision.
972 * Computes result in 64 bit precision.
985 /** @brief Convert nanoseconds to hardware cycles. 32 bits. Rounds up.
988 * Computes result in 32 bit precision.
1004 * Computes result in 64 bit precision.
1017 /** @brief Convert nanoseconds to ticks. 32 bits. Truncates.
1020 * Computes result in 32 bit precision.
1036 * Computes result in 64 bit precision.
1049 /** @brief Convert nanoseconds to ticks. 32 bits. Round nearest.
1052 * Computes result in 32 bit precision.
1068 * Computes result in 64 bit precision.
1081 /** @brief Convert nanoseconds to ticks. 32 bits. Rounds up.
1084 * Computes result in 32 bit precision.
1100 * Computes result in 64 bit precision.
1113 /** @brief Convert hardware cycles to seconds. 32 bits. Truncates.
1116 * Computes result in 32 bit precision.
1132 * Computes result in 64 bit precision.
1145 /** @brief Convert hardware cycles to seconds. 32 bits. Round nearest.
1148 * Computes result in 32 bit precision.
1164 * Computes result in 64 bit precision.
1177 /** @brief Convert hardware cycles to seconds. 32 bits. Rounds up.
1180 * Computes result in 32 bit precision.
1196 * Computes result in 64 bit precision.
1209 /** @brief Convert hardware cycles to milliseconds. 32 bits. Truncates.
1212 * Computes result in 32 bit precision.
1228 * Computes result in 64 bit precision.
1241 /** @brief Convert hardware cycles to milliseconds. 32 bits. Round nearest.
1244 * Computes result in 32 bit precision.
1260 * Computes result in 64 bit precision.
1273 /** @brief Convert hardware cycles to milliseconds. 32 bits. Rounds up.
1276 * Computes result in 32 bit precision.
1292 * Computes result in 64 bit precision.
1305 /** @brief Convert hardware cycles to microseconds. 32 bits. Truncates.
1308 * Computes result in 32 bit precision.
1324 * Computes result in 64 bit precision.
1337 /** @brief Convert hardware cycles to microseconds. 32 bits. Round nearest.
1340 * Computes result in 32 bit precision.
1356 * Computes result in 64 bit precision.
1369 /** @brief Convert hardware cycles to microseconds. 32 bits. Rounds up.
1372 * Computes result in 32 bit precision.
1388 * Computes result in 64 bit precision.
1401 /** @brief Convert hardware cycles to nanoseconds. 32 bits. Truncates.
1404 * Computes result in 32 bit precision.
1420 * Computes result in 64 bit precision.
1433 /** @brief Convert hardware cycles to nanoseconds. 32 bits. Round nearest.
1436 * Computes result in 32 bit precision.
1452 * Computes result in 64 bit precision.
1465 /** @brief Convert hardware cycles to nanoseconds. 32 bits. Rounds up.
1468 * Computes result in 32 bit precision.
1484 * Computes result in 64 bit precision.
1497 /** @brief Convert hardware cycles to ticks. 32 bits. Truncates.
1500 * Computes result in 32 bit precision.
1516 * Computes result in 64 bit precision.
1529 /** @brief Convert hardware cycles to ticks. 32 bits. Round nearest.
1532 * Computes result in 32 bit precision.
1548 * Computes result in 64 bit precision.
1561 /** @brief Convert hardware cycles to ticks. 32 bits. Rounds up.
1564 * Computes result in 32 bit precision.
1580 * Computes result in 64 bit precision.
1593 /** @brief Convert ticks to seconds. 32 bits. Truncates.
1596 * Computes result in 32 bit precision.
1612 * Computes result in 64 bit precision.
1625 /** @brief Convert ticks to seconds. 32 bits. Round nearest.
1628 * Computes result in 32 bit precision.
1644 * Computes result in 64 bit precision.
1657 /** @brief Convert ticks to seconds. 32 bits. Rounds up.
1660 * Computes result in 32 bit precision.
1676 * Computes result in 64 bit precision.
1689 /** @brief Convert ticks to milliseconds. 32 bits. Truncates.
1692 * Computes result in 32 bit precision.
1708 * Computes result in 64 bit precision.
1721 /** @brief Convert ticks to milliseconds. 32 bits. Round nearest.
1724 * Computes result in 32 bit precision.
1740 * Computes result in 64 bit precision.
1753 /** @brief Convert ticks to milliseconds. 32 bits. Rounds up.
1756 * Computes result in 32 bit precision.
1772 * Computes result in 64 bit precision.
1785 /** @brief Convert ticks to microseconds. 32 bits. Truncates.
1788 * Computes result in 32 bit precision.
1804 * Computes result in 64 bit precision.
1817 /** @brief Convert ticks to microseconds. 32 bits. Round nearest.
1820 * Computes result in 32 bit precision.
1836 * Computes result in 64 bit precision.
1849 /** @brief Convert ticks to microseconds. 32 bits. Rounds up.
1852 * Computes result in 32 bit precision.
1868 * Computes result in 64 bit precision.
1881 /** @brief Convert ticks to nanoseconds. 32 bits. Truncates.
1884 * Computes result in 32 bit precision.
1900 * Computes result in 64 bit precision.
1913 /** @brief Convert ticks to nanoseconds. 32 bits. Round nearest.
1916 * Computes result in 32 bit precision.
1932 * Computes result in 64 bit precision.
1945 /** @brief Convert ticks to nanoseconds. 32 bits. Rounds up.
1948 * Computes result in 32 bit precision.
1964 * Computes result in 64 bit precision.
1977 /** @brief Convert ticks to hardware cycles. 32 bits. Truncates.
1980 * Computes result in 32 bit precision.
1996 * Computes result in 64 bit precision.
2009 /** @brief Convert ticks to hardware cycles. 32 bits. Round nearest.
2012 * Computes result in 32 bit precision.
2028 * Computes result in 64 bit precision.
2041 /** @brief Convert ticks to hardware cycles. 32 bits. Rounds up.
2044 * Computes result in 32 bit precision.
2060 * Computes result in 64 bit precision.