kernel: ksched.h: Incorrect argument type in _pend_current_thread
In _pend_current_thread the argument key is always a unsigned interger type and this function forces it to become a signed interger. This is a dangerous behavior and cant be trusted to work as expected. Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This commit is contained in:
parent
e9cb0ae72a
commit
6176692f4b
2 changed files with 2 additions and 2 deletions
|
@ -37,7 +37,7 @@ void _move_thread_to_end_of_prio_q(struct k_thread *thread);
|
||||||
void _remove_thread_from_ready_q(struct k_thread *thread);
|
void _remove_thread_from_ready_q(struct k_thread *thread);
|
||||||
int _is_thread_time_slicing(struct k_thread *thread);
|
int _is_thread_time_slicing(struct k_thread *thread);
|
||||||
void _unpend_thread_no_timeout(struct k_thread *thread);
|
void _unpend_thread_no_timeout(struct k_thread *thread);
|
||||||
int _pend_current_thread(int key, _wait_q_t *wait_q, s32_t timeout);
|
int _pend_current_thread(u32_t key, _wait_q_t *wait_q, s32_t timeout);
|
||||||
void _pend_thread(struct k_thread *thread, _wait_q_t *wait_q, s32_t timeout);
|
void _pend_thread(struct k_thread *thread, _wait_q_t *wait_q, s32_t timeout);
|
||||||
void _reschedule(u32_t key);
|
void _reschedule(u32_t key);
|
||||||
struct k_thread *_unpend_first_thread(_wait_q_t *wait_q);
|
struct k_thread *_unpend_first_thread(_wait_q_t *wait_q);
|
||||||
|
|
|
@ -377,7 +377,7 @@ void z_thread_timeout(struct _timeout *to)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int _pend_current_thread(int key, _wait_q_t *wait_q, s32_t timeout)
|
int _pend_current_thread(u32_t key, _wait_q_t *wait_q, s32_t timeout)
|
||||||
{
|
{
|
||||||
pend(_current, wait_q, timeout);
|
pend(_current, wait_q, timeout);
|
||||||
return _Swap(key);
|
return _Swap(key);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue