Home
last modified time | relevance | path

Searched refs:t (Results 1 – 25 of 734) sorted by relevance

12345678910>>...30

/Zephyr-Core-3.7.0/include/zephyr/sys/
Dtime_units.h357 #define k_sec_to_cyc_floor32(t) \ argument
358 z_tmcvt_32(t, Z_HZ_sec, Z_HZ_cyc, Z_CCYC, false, false)
373 #define k_sec_to_cyc_floor64(t) \ argument
374 z_tmcvt_64(t, Z_HZ_sec, Z_HZ_cyc, Z_CCYC, false, false)
389 #define k_sec_to_cyc_near32(t) \ argument
390 z_tmcvt_32(t, Z_HZ_sec, Z_HZ_cyc, Z_CCYC, false, true)
405 #define k_sec_to_cyc_near64(t) \ argument
406 z_tmcvt_64(t, Z_HZ_sec, Z_HZ_cyc, Z_CCYC, false, true)
421 #define k_sec_to_cyc_ceil32(t) \ argument
422 z_tmcvt_32(t, Z_HZ_sec, Z_HZ_cyc, Z_CCYC, true, false)
[all …]
/Zephyr-Core-3.7.0/tests/ztest/busy_sim/src/
Dmain.c15 uint32_t t = k_uptime_get_32(); in ZTEST() local
18 t = k_uptime_get_32() - t; in ZTEST()
20 zassert_true((t > (ms - delta)) && (t < (ms + delta))); in ZTEST()
23 t = k_uptime_get_32(); in ZTEST()
26 t = k_uptime_get_32() - t; in ZTEST()
33 zassert_true((t > (busy_ms - 2 * delta)) && (t < (busy_ms + 4 * delta)), in ZTEST()
35 busy_ms - 2 * delta, busy_ms + 4 * delta, t); in ZTEST()
38 t = k_uptime_get_32(); in ZTEST()
40 t = k_uptime_get_32() - t; in ZTEST()
41 zassert_true((t > (ms - delta)) && (t < (ms + delta))); in ZTEST()
/Zephyr-Core-3.7.0/include/zephyr/
Dsys_clock.h114 #define Z_TIMEOUT_TICKS(t) ((k_timeout_t) { (t) }) argument
116 #define Z_TIMEOUT_TICKS(t) ((k_timeout_t) { .ticks = (t) }) argument
121 # define Z_TIMEOUT_MS(t) Z_TIMEOUT_TICKS((k_ticks_t)k_ms_to_ticks_ceil64(MAX(t, 0))) argument
122 # define Z_TIMEOUT_US(t) Z_TIMEOUT_TICKS((k_ticks_t)k_us_to_ticks_ceil64(MAX(t, 0))) argument
123 # define Z_TIMEOUT_NS(t) Z_TIMEOUT_TICKS((k_ticks_t)k_ns_to_ticks_ceil64(MAX(t, 0))) argument
124 # define Z_TIMEOUT_CYC(t) Z_TIMEOUT_TICKS((k_ticks_t)k_cyc_to_ticks_ceil64(MAX(t, 0))) argument
125 # define Z_TIMEOUT_MS_TICKS(t) ((k_ticks_t)k_ms_to_ticks_ceil64(MAX(t, 0))) argument
127 # define Z_TIMEOUT_MS(t) Z_TIMEOUT_TICKS((k_ticks_t)k_ms_to_ticks_ceil32(MAX(t, 0))) argument
128 # define Z_TIMEOUT_US(t) Z_TIMEOUT_TICKS((k_ticks_t)k_us_to_ticks_ceil32(MAX(t, 0))) argument
129 # define Z_TIMEOUT_NS(t) Z_TIMEOUT_TICKS((k_ticks_t)k_ns_to_ticks_ceil32(MAX(t, 0))) argument
[all …]
/Zephyr-Core-3.7.0/kernel/
Dtimeout.c41 sys_dnode_t *t = sys_dlist_peek_head(&timeout_list); in first() local
43 return (t == NULL) ? NULL : CONTAINER_OF(t, struct _timeout, node); in first()
46 static struct _timeout *next(struct _timeout *t) in next() argument
48 sys_dnode_t *n = sys_dlist_peek_next(&timeout_list, &t->node); in next()
53 static void remove_timeout(struct _timeout *t) in remove_timeout() argument
55 if (next(t) != NULL) { in remove_timeout()
56 next(t)->dticks += t->dticks; in remove_timeout()
59 sys_dlist_remove(&t->node); in remove_timeout()
114 struct _timeout *t; in z_add_timeout() local
125 for (t = first(); t != NULL; t = next(t)) { in z_add_timeout()
[all …]
/Zephyr-Core-3.7.0/lib/posix/options/
Dpthread.c93 static inline void posix_thread_q_set(struct posix_thread *t, enum posix_thread_qid qid) in posix_thread_q_set() argument
99 sys_dlist_append(&posix_thread_q[qid], &t->q_node); in posix_thread_q_set()
100 t->qid = qid; in posix_thread_q_set()
103 __ASSERT(false, "cannot set invalid qid %d for posix thread %p", qid, t); in posix_thread_q_set()
108 static inline enum posix_thread_qid posix_thread_q_get(struct posix_thread *t) in posix_thread_q_get() argument
110 switch (t->qid) { in posix_thread_q_get()
114 return t->qid; in posix_thread_q_get()
116 __ASSERT(false, "posix thread %p has invalid qid: %d", t, t->qid); in posix_thread_q_get()
129 static inline size_t posix_thread_to_offset(struct posix_thread *t) in posix_thread_to_offset() argument
131 return t - posix_thread_pool; in posix_thread_to_offset()
[all …]
/Zephyr-Core-3.7.0/subsys/shell/modules/
Ddate_service.c23 static void date_print(const struct shell *sh, struct tm *t) in date_print() argument
28 t->tm_year + 1900, in date_print()
29 t->tm_mon + 1, in date_print()
30 t->tm_mday, in date_print()
31 t->tm_hour, in date_print()
32 t->tm_min, in date_print()
33 t->tm_sec); in date_print()
36 static int get_y_m_d(const struct shell *sh, struct tm *t, char *date_str) in get_y_m_d() argument
76 t->tm_year = year - 1900; in get_y_m_d()
77 t->tm_mon = month - 1; in get_y_m_d()
[all …]
/Zephyr-Core-3.7.0/tests/misc/iterable_sections/src/
Dmain.c62 STRUCT_SECTION_FOREACH(test_ram, t) { in ZTEST()
63 out = (out << 8) | t->i; in ZTEST()
64 t->i |= CHECK_BIT; in ZTEST()
79 STRUCT_SECTION_FOREACH_ALTERNATE(test_ram2, test_ram, t) { in ZTEST()
80 out = (out << 8) | t->i; in ZTEST()
86 STRUCT_SECTION_FOREACH(test_ram_named, t) { in ZTEST()
87 out = (out << 8) | t->i; in ZTEST()
93 STRUCT_SECTION_FOREACH(test_ram_numeric, t) { in ZTEST()
94 out = (out << 8) | t->i; in ZTEST()
100 STRUCT_SECTION_FOREACH_ALTERNATE(ramn_alt, test_ram_named, t) { in ZTEST()
[all …]
/Zephyr-Core-3.7.0/tests/benchmarks/sys_kernel/src/
Dmem_slab.c71 uint32_t t; in mem_slab_test() local
82 t = BENCH_START(); in mem_slab_test()
84 t = TIME_STAMP_DELTA_GET(t); in mem_slab_test()
86 return_value += check_result(i, t); in mem_slab_test()
95 t = BENCH_START(); in mem_slab_test()
97 t = TIME_STAMP_DELTA_GET(t); in mem_slab_test()
104 return_value += check_result(i, t); in mem_slab_test()
Dsema.c109 uint32_t t; in sema_test() local
123 t = BENCH_START(); in sema_test()
132 t = TIME_STAMP_DELTA_GET(t); in sema_test()
134 return_value += check_result(i, t); in sema_test()
148 t = BENCH_START(); in sema_test()
157 t = TIME_STAMP_DELTA_GET(t); in sema_test()
159 return_value += check_result(i, t); in sema_test()
173 t = BENCH_START(); in sema_test()
183 t = TIME_STAMP_DELTA_GET(t); in sema_test()
185 return_value += check_result(i, t); in sema_test()
Dstack.c138 uint32_t t; in stack_test() local
153 t = BENCH_START(); in stack_test()
162 t = TIME_STAMP_DELTA_GET(t); in stack_test()
164 return_value += check_result(i, t); in stack_test()
179 t = BENCH_START(); in stack_test()
189 t = TIME_STAMP_DELTA_GET(t); in stack_test()
191 return_value += check_result(i, t); in stack_test()
208 t = BENCH_START(); in stack_test()
232 t = TIME_STAMP_DELTA_GET(t); in stack_test()
234 return_value += check_result(i * 2, t); in stack_test()
Dlifo.c136 uint32_t t; in lifo_test() local
155 t = BENCH_START(); in lifo_test()
165 t = TIME_STAMP_DELTA_GET(t); in lifo_test()
167 return_value += check_result(i, t); in lifo_test()
187 t = BENCH_START(); in lifo_test()
199 t = TIME_STAMP_DELTA_GET(t); in lifo_test()
201 return_value += check_result(i, t); in lifo_test()
221 t = BENCH_START(); in lifo_test()
245 t = TIME_STAMP_DELTA_GET(t); in lifo_test()
247 return_value += check_result(i * 2, t); in lifo_test()
Dmwfifo.c137 uint32_t t; in fifo_test() local
156 t = BENCH_START(); in fifo_test()
165 t = TIME_STAMP_DELTA_GET(t); in fifo_test()
167 return_value += check_result(i, t); in fifo_test()
187 t = BENCH_START(); in fifo_test()
197 t = TIME_STAMP_DELTA_GET(t); in fifo_test()
199 return_value += check_result(i, t); in fifo_test()
219 t = BENCH_START(); in fifo_test()
245 t = TIME_STAMP_DELTA_GET(t); in fifo_test()
247 return_value += check_result(i * 2, t); in fifo_test()
/Zephyr-Core-3.7.0/tests/subsys/sip_svc/src/
Dmain.c56 uint64_t t = 0; in sip_svc_send_sync_request() local
83 t = k_cyc_to_us_ceil64(priv.time_end - priv.time_start); in sip_svc_send_sync_request()
84 tot_time->sync_time += t; in sip_svc_send_sync_request()
87 k_thread_name_get(k_current_get()), trans_id, t); in sip_svc_send_sync_request()
125 uint64_t t = 0; in sip_svc_send_async_request() local
167 t = k_cyc_to_us_ceil64(priv.time_end - priv.time_start); in sip_svc_send_async_request()
168 tot_time->async_time += t; in sip_svc_send_async_request()
171 k_thread_name_get(k_current_get()), trans_id, t); in sip_svc_send_async_request()
209 struct total_time t[SIP_SVC_CLIENT_INSTANCES] = {0}; in ZTEST() local
212 ZTRESS_EXECUTE(ZTRESS_THREAD(sip_svc_register_and_send, &t[0], CONFIG_ITERATIONS, 0, in ZTEST()
[all …]
/Zephyr-Core-3.7.0/tests/kernel/context/
DREADME.txt100 thread (q order: 2, t/o: 500) is running
101 got thread (q order: 2, t/o: 500) as expected
102 thread (q order: 3, t/o: 750) is running
103 got thread (q order: 3, t/o: 750) as expected
104 thread (q order: 0, t/o: 1000) is running
105 got thread (q order: 0, t/o: 1000) as expected
106 thread (q order: 6, t/o: 1250) is running
107 got thread (q order: 6, t/o: 1250) as expected
108 thread (q order: 1, t/o: 1500) is running
109 got thread (q order: 1, t/o: 1500) as expected
[all …]
/Zephyr-Core-3.7.0/subsys/testsuite/include/zephyr/
Dtimestamp.h35 uint32_t t; in TIME_STAMP_DELTA_GET() local
40 t = OS_GET_TIME(); in TIME_STAMP_DELTA_GET()
41 uint32_t res = (t >= ts) ? (t - ts) : (ULONG_MAX - ts + t); in TIME_STAMP_DELTA_GET()
55 uint32_t t = OS_GET_TIME(); in bench_test_init() local
57 tm_off = OS_GET_TIME() - t; in bench_test_init()
/Zephyr-Core-3.7.0/arch/arc/core/
Dtimestamp.c29 uint64_t t; in z_tsc_read() local
33 t = (uint64_t)sys_clock_tick_get(); in z_tsc_read()
36 t *= k_ticks_to_cyc_floor64(1); in z_tsc_read()
37 t += (uint64_t)count; in z_tsc_read()
38 return t; in z_tsc_read()
/Zephyr-Core-3.7.0/drivers/watchdog/
Dwdt_sifive.c75 uint32_t t; in wdt_sifive_set_max_timeout() local
77 t = wdt->wdogcfg; in wdt_sifive_set_max_timeout()
78 t |= WDOGCFG_SCALE_MASK; in wdt_sifive_set_max_timeout()
81 wdt->wdogcfg = t; in wdt_sifive_set_max_timeout()
90 uint32_t t; in wdt_sifive_isr() local
94 t = wdt->wdogcfg; in wdt_sifive_isr()
95 t &= ~WDOGCFG_IP0; in wdt_sifive_isr()
98 wdt->wdogcfg = t; in wdt_sifive_isr()
121 uint32_t t, mode; in wdt_sifive_setup() local
138 t = wdt->wdogcfg; in wdt_sifive_setup()
[all …]
/Zephyr-Core-3.7.0/scripts/coccinelle/
Dsame_identifier.cocci16 identifier t, v;
19 struct t *v@p;
21 struct t v@p;
23 union t v@p;
27 t << common_case.t;
33 if t == v:
48 t << per_type.T;
54 if t == v:
70 t << function_match.T2;
75 if v == t.split(" ")[-1]:
/Zephyr-Core-3.7.0/tests/drivers/timer/nrf_grtc_timer/src/
Dmain.c17 k_timeout_t t = K_MSEC(1); in ZTEST() local
19 uint64_t exp_ticks = z_nrf_grtc_timer_read() + t.ticks * CYC_PER_TICK; in ZTEST()
23 ticks = z_nrf_grtc_timer_get_ticks(t); in ZTEST()
31 t = Z_TIMEOUT_TICKS(Z_TICK_ABS(sys_clock_tick_get() - K_MSEC(1).ticks)); in ZTEST()
34 ticks = z_nrf_grtc_timer_get_ticks(t); in ZTEST()
41 t = Z_TIMEOUT_TICKS(Z_TICK_ABS(sys_clock_tick_get() + K_MSEC(10).ticks)); in ZTEST()
43 ticks = z_nrf_grtc_timer_get_ticks(t); in ZTEST()
/Zephyr-Core-3.7.0/scripts/pylib/twister/
Dexpr_parser.py50 def t_HEX(t): argument
52 t.value = str(int(t.value, 16))
53 return t
55 def t_INTEGER(t): argument
57 t.value = str(int(t.value))
58 return t
60 def t_STR(t): argument
63 t.value = t.value[1:-1]
64 return t
90 def t_SYMBOL(t): argument
[all …]
/Zephyr-Core-3.7.0/tests/lib/mpsc_pbuf/src/
Dmain.c124 union test_item *t; in item_put_no_overwrite() local
129 t = (union test_item *)mpsc_pbuf_claim(&buffer); in item_put_no_overwrite()
130 zassert_true(t); in item_put_no_overwrite()
131 zassert_equal(t->data.data, i); in item_put_no_overwrite()
132 mpsc_pbuf_free(&buffer, &t->item); in item_put_no_overwrite()
180 union test_item *t; in item_put_saturate() local
190 t = (union test_item *)mpsc_pbuf_claim(&buffer); in item_put_saturate()
191 zassert_true(t); in item_put_saturate()
192 zassert_equal(t->data.data, i); in item_put_saturate()
193 mpsc_pbuf_free(&buffer, &t->item); in item_put_saturate()
[all …]
/Zephyr-Core-3.7.0/tests/kernel/sched/schedule_api/src/
Dtest_sched_timeslice_reset.c52 uint32_t t = cycles_delta(&elapsed_slice); in thread_time_slice() local
85 thread_idx, t, expected_slice_min, expected_slice_max); in thread_time_slice()
96 zassert_true(t >= expected_slice_min, in thread_time_slice()
98 expected_slice_min, t); in thread_time_slice()
99 zassert_true(t <= expected_slice_max, in thread_time_slice()
101 expected_slice_max, t); in thread_time_slice()
103 (void)t; in thread_time_slice()
131 struct k_thread t[NUM_THREAD]; in ZTEST() local
165 tid[i] = k_thread_create(&t[i], tstacks[i], STACK_SIZE, in ZTEST()
/Zephyr-Core-3.7.0/drivers/dac/
Ddac_dacx0508.c364 #define INST_DT_DACX0508(inst, t) DT_INST(inst, ti_dac##t) argument
366 #define DACX0508_DEVICE(t, n, res) \ argument
367 static struct dacx0508_data dac##t##_data_##n; \
368 static const struct dacx0508_config dac##t##_config_##n = { \
369 .bus = SPI_DT_SPEC_GET(INST_DT_DACX0508(n, t), \
373 .reference = DT_PROP(INST_DT_DACX0508(n, t), \
375 .gain[0] = DT_PROP(INST_DT_DACX0508(n, t), channel0_gain), \
376 .gain[1] = DT_PROP(INST_DT_DACX0508(n, t), channel1_gain), \
377 .gain[2] = DT_PROP(INST_DT_DACX0508(n, t), channel2_gain), \
378 .gain[3] = DT_PROP(INST_DT_DACX0508(n, t), channel3_gain), \
[all …]
Ddac_ltc166x.c107 #define INST_DT_LTC166X(inst, t) DT_INST(inst, lltc_ltc##t) argument
109 #define LTC166X_DEVICE(t, n, res, nchan) \ argument
110 static const struct ltc166x_config ltc##t##_config_##n = { \
111 .bus = SPI_DT_SPEC_GET(INST_DT_LTC166X(n, t), \
117 DEVICE_DT_DEFINE(INST_DT_LTC166X(n, t), \
120 &ltc##t##_config_##n, POST_KERNEL, \
136 #define INST_DT_LTC166X_FOREACH(t, inst_expr) \ argument
137 LISTIFY(DT_NUM_INST_STATUS_OKAY(lltc_ltc##t), \
/Zephyr-Core-3.7.0/tests/ztest/ztress/src/
Dmain.c30 k_timeout_t t = Z_TIMEOUT_TICKS(20); in ZTEST() local
39 ZTRESS_EXECUTE(ZTRESS_THREAD(ztress_handler_busy, NULL, repeat, 0, t), in ZTEST()
40 ZTRESS_THREAD(ztress_handler_busy, NULL, repeat, 1000, t)); in ZTEST()
47 ZTRESS_CONTEXT_INITIALIZER(ztress_handler_busy, NULL, repeat, 0, t); in ZTEST()
49 ZTRESS_CONTEXT_INITIALIZER(ztress_handler_busy, NULL, repeat, 1000, t), in ZTEST()
50 ZTRESS_CONTEXT_INITIALIZER(ztress_handler_busy, NULL, repeat, 1000, t) in ZTEST()
136 k_timeout_t t = Z_TIMEOUT_TICKS(20); in ZTEST() local
143 ZTRESS_CONTEXT_INITIALIZER(ztress_handler_busy, NULL, repeat, 0, t); in ZTEST()
145 ZTRESS_CONTEXT_INITIALIZER(ztress_handler_busy, NULL, repeat, 1000, t), in ZTEST()
146 ZTRESS_CONTEXT_INITIALIZER(ztress_handler_busy, NULL, repeat, 1000, t), in ZTEST()
[all …]

12345678910>>...30