Lines Matching +full:max +full:- +full:value
2 * Copyright (c) 2014-2015 Wind River Systems, Inc.
4 * SPDX-License-Identifier: Apache-2.0
51 #define K_TICKS_FOREVER ((k_ticks_t) -1)
119 #if defined(__cplusplus) && ((__cplusplus - 0) < 202002L)
127 # define Z_TIMEOUT_MS(t) Z_TIMEOUT_TICKS((k_ticks_t)k_ms_to_ticks_ceil64(MAX(t, 0)))
128 # define Z_TIMEOUT_US(t) Z_TIMEOUT_TICKS((k_ticks_t)k_us_to_ticks_ceil64(MAX(t, 0)))
129 # define Z_TIMEOUT_NS(t) Z_TIMEOUT_TICKS((k_ticks_t)k_ns_to_ticks_ceil64(MAX(t, 0)))
130 # define Z_TIMEOUT_CYC(t) Z_TIMEOUT_TICKS((k_ticks_t)k_cyc_to_ticks_ceil64(MAX(t, 0)))
131 # define Z_TIMEOUT_MS_TICKS(t) ((k_ticks_t)k_ms_to_ticks_ceil64(MAX(t, 0)))
133 # define Z_TIMEOUT_MS(t) Z_TIMEOUT_TICKS((k_ticks_t)k_ms_to_ticks_ceil32(MAX(t, 0)))
134 # define Z_TIMEOUT_US(t) Z_TIMEOUT_TICKS((k_ticks_t)k_us_to_ticks_ceil32(MAX(t, 0)))
135 # define Z_TIMEOUT_NS(t) Z_TIMEOUT_TICKS((k_ticks_t)k_ns_to_ticks_ceil32(MAX(t, 0)))
136 # define Z_TIMEOUT_CYC(t) Z_TIMEOUT_TICKS((k_ticks_t)k_cyc_to_ticks_ceil32(MAX(t, 0)))
137 # define Z_TIMEOUT_MS_TICKS(t) ((k_ticks_t)k_ms_to_ticks_ceil32(MAX(t, 0)))
141 * the negative space below K_TICKS_FOREVER) and (non-negative) delta
143 * value was an absolute timeout with the returned expiration time.
146 * the same value in both spaces! Clever, huh?
148 #define Z_TICK_ABS(t) (K_TICKS_FOREVER - 1 - (t))
157 #error "SYS_CLOCK_HW_CYCLES_PER_SEC must be non-zero!"
164 * We default to using 64-bit intermediates in timescale conversions,
228 * @brief Calculate a timepoint value
232 * be called once, synchronously with the user passing a new timeout value.
236 * @param timeout Timeout value relative to current time (may also be
238 * @retval Timepoint value corresponding to given timeout
253 * @param timepoint Timepoint for which a timeout value is wanted.
254 * @retval Corresponding timeout value.
267 * @return zero if both timepoints are the same. Negative value if timepoint @a a is before
275 return a.tick < b.tick ? -1 : 1; in sys_timepoint_cmp()
305 return b.wait ? -1 : 1; in sys_timepoint_cmp()