Skip to content

Commit bdb04db

Browse files
peter-mitsiskartben
authored andcommitted
kernel: Alter z_abort_thread_timeout() return type
No caller of the internal kernel routine z_abort_thread_timeout() uses its return value anymore. Signed-off-by: Peter Mitsis <[email protected]>
1 parent 30bac03 commit bdb04db

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

kernel/include/ksched.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static ALWAYS_INLINE struct k_thread *z_unpend_first_thread(_wait_q_t *wait_q)
180180
thread = _priq_wait_best(&wait_q->waitq);
181181
if (unlikely(thread != NULL)) {
182182
unpend_thread_no_timeout(thread);
183-
(void)z_abort_thread_timeout(thread);
183+
z_abort_thread_timeout(thread);
184184
}
185185
}
186186

kernel/include/timeout_q.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ static inline void z_add_thread_timeout(struct k_thread *thread, k_timeout_t tic
4949
z_add_timeout(&thread->base.timeout, z_thread_timeout, ticks);
5050
}
5151

52-
static inline int z_abort_thread_timeout(struct k_thread *thread)
52+
static inline void z_abort_thread_timeout(struct k_thread *thread)
5353
{
54-
return z_abort_timeout(&thread->base.timeout);
54+
z_abort_timeout(&thread->base.timeout);
5555
}
5656

5757
int32_t z_get_next_timeout_expiry(void);
@@ -62,7 +62,7 @@ k_ticks_t z_timeout_remaining(const struct _timeout *timeout);
6262

6363
/* Stubs when !CONFIG_SYS_CLOCK_EXISTS */
6464
#define z_init_thread_timeout(thread_base) do {} while (false)
65-
#define z_abort_thread_timeout(to) (0)
65+
#define z_abort_thread_timeout(to) do {} while (false)
6666
#define z_is_inactive_timeout(to) 1
6767
#define z_get_next_timeout_expiry() ((int32_t) K_TICKS_FOREVER)
6868
#define z_set_timeout_expiry(ticks, is_idle) do {} while (false)

kernel/sched.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ struct k_thread *z_unpend1_no_timeout(_wait_q_t *wait_q)
652652
void z_unpend_thread(struct k_thread *thread)
653653
{
654654
z_unpend_thread_no_timeout(thread);
655-
(void)z_abort_thread_timeout(thread);
655+
z_abort_thread_timeout(thread);
656656
}
657657

658658
/* Priority set utility that does no rescheduling, it just changes the
@@ -1164,7 +1164,7 @@ void z_impl_k_wakeup(k_tid_t thread)
11641164
{
11651165
SYS_PORT_TRACING_OBJ_FUNC(k_thread, wakeup, thread);
11661166

1167-
(void)z_abort_thread_timeout(thread);
1167+
z_abort_thread_timeout(thread);
11681168

11691169
k_spinlock_key_t key = k_spin_lock(&_sched_spinlock);
11701170

@@ -1212,7 +1212,7 @@ static inline void unpend_all(_wait_q_t *wait_q)
12121212

12131213
for (thread = z_waitq_head(wait_q); thread != NULL; thread = z_waitq_head(wait_q)) {
12141214
unpend_thread_no_timeout(thread);
1215-
(void)z_abort_thread_timeout(thread);
1215+
z_abort_thread_timeout(thread);
12161216
arch_thread_return_value_set(thread, 0);
12171217
ready_thread(thread);
12181218
}
@@ -1247,7 +1247,7 @@ static ALWAYS_INLINE void halt_thread(struct k_thread *thread, uint8_t new_state
12471247
if (thread->base.pended_on != NULL) {
12481248
unpend_thread_no_timeout(thread);
12491249
}
1250-
(void)z_abort_thread_timeout(thread);
1250+
z_abort_thread_timeout(thread);
12511251
unpend_all(&thread->join_queue);
12521252

12531253
/* Edge case: aborting arch_current_thread() from within an
@@ -1458,7 +1458,7 @@ bool z_sched_wake(_wait_q_t *wait_q, int swap_retval, void *swap_data)
14581458
swap_retval,
14591459
swap_data);
14601460
unpend_thread_no_timeout(thread);
1461-
(void)z_abort_thread_timeout(thread);
1461+
z_abort_thread_timeout(thread);
14621462
ready_thread(thread);
14631463
ret = true;
14641464
}

0 commit comments

Comments
 (0)