Lines Matching +full:in +full:- +full:max
2 * Copyright (c) 2014-2015 Wind River Systems, Inc.
4 * SPDX-License-Identifier: Apache-2.0
37 * @brief Tick precision used in timeout APIs
39 * This type defines the word size of the timeout values used in
51 #define K_TICKS_FOREVER ((k_ticks_t) -1)
56 * Timeout arguments presented to kernel APIs are stored in this
57 * opaque type, which is capable of representing times in various
75 * (e.g. K_NO_WAIT and K_FOREVER) when implementing their own APIs in
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
146 * the same value in both spaces! Clever, huh?
148 #define Z_TICK_ABS(t) (K_TICKS_FOREVER - 1 - (t))
150 /* added tick needed to account for tick in progress */
157 #error "SYS_CLOCK_HW_CYCLES_PER_SEC must be non-zero!"
164 * We default to using 64-bit intermediates in timescale conversions,
218 * Absolute timepoints are stored in this opaque type.
249 * If the timepoint is now in the past or if it was created with `K_NO_WAIT`
275 return a.tick < b.tick ? -1 : 1; in sys_timepoint_cmp()
305 return b.wait ? -1 : 1; in sys_timepoint_cmp()
314 * @retval true if the timepoint is in the past, false otherwise