Skip to content

Commit da6def8

Browse files
nashifdkalowsk
authored andcommitted
tests: benchmarks: timeout_mgmt: use z_try_abort_timeout()
Commits 805b2af and 387b387 replaced the kernel-internal z_abort_timeout() with z_try_abort_timeout(), which tracks in-flight timeouts and returns 0, -EINVAL or -EAGAIN. Every in-tree caller was migrated except this benchmark, which still called the function that no longer exists: error: implicit declaration of function 'z_abort_timeout' Update the three call sites. The return value is deliberately discarded: the benchmark aborts timeouts it has just installed itself and measures the cost of the operation, not its outcome. Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
1 parent f1521ed commit da6def8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • tests/benchmarks/timeout_mgmt/src

tests/benchmarks/timeout_mgmt/src/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static void test_decreasing_timeouts(unsigned int num_timeouts)
6464

6565
for (i = 0; i < num_timeouts; i++) {
6666
start = timing_counter_get();
67-
z_abort_timeout(&timeout[i]);
67+
(void)z_try_abort_timeout(&timeout[i]);
6868
finish = timing_counter_get();
6969
abort_cycles[i] += timing_cycles_get(&start, &finish);
7070
}
@@ -95,7 +95,7 @@ static void test_increasing_timeouts(unsigned int num_timeouts)
9595

9696
for (i = 0; i < num_timeouts; i++) {
9797
start = timing_counter_get();
98-
z_abort_timeout(&timeout[i]);
98+
(void)z_try_abort_timeout(&timeout[i]);
9999
finish = timing_counter_get();
100100
abort_cycles[i] += timing_cycles_get(&start, &finish);
101101
}
@@ -126,7 +126,7 @@ static void test_interleaved_timeouts(unsigned int num_timeouts)
126126

127127
for (i = 0; i < num_timeouts; i++) {
128128
start = timing_counter_get();
129-
z_abort_timeout(&timeout[num_timeouts - i - 1]);
129+
(void)z_try_abort_timeout(&timeout[num_timeouts - i - 1]);
130130
finish = timing_counter_get();
131131
abort_cycles[i] += timing_cycles_get(&start, &finish);
132132
}

0 commit comments

Comments
 (0)