kernel: fix thread prio and stack size types in some APIs
Prio should be an int, since values are small integers, not a fixed-size int32_t. It aligns with the prio parameters of the other APIs. Stack size should be size_t. Change-Id: Id29751b86c4ad7a7c2a7ffe446c2a96ae83c77bf Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
parent
db0e9aea51
commit
669360d5ec
8 changed files with 11 additions and 11 deletions
|
@ -84,7 +84,7 @@ static ALWAYS_INLINE void thread_monitor_init(struct k_thread *thread)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void _new_thread(char *pStackMem, unsigned stackSize,
|
||||
void _new_thread(char *pStackMem, size_t stackSize,
|
||||
void *uk_task_ptr, _thread_entry_t pEntry,
|
||||
void *parameter1, void *parameter2, void *parameter3,
|
||||
int priority, unsigned options)
|
||||
|
|
|
@ -80,7 +80,7 @@ static ALWAYS_INLINE void thread_monitor_init(struct tcs *tcs)
|
|||
* @return N/A
|
||||
*/
|
||||
|
||||
void _new_thread(char *pStackMem, unsigned stackSize,
|
||||
void _new_thread(char *pStackMem, size_t stackSize,
|
||||
void *uk_task_ptr, _thread_entry_t pEntry,
|
||||
void *parameter1, void *parameter2, void *parameter3,
|
||||
int priority, unsigned options)
|
||||
|
|
|
@ -60,7 +60,7 @@ struct init_stack_frame {
|
|||
};
|
||||
|
||||
|
||||
void _new_thread(char *stack_memory, unsigned stack_size,
|
||||
void _new_thread(char *stack_memory, size_t stack_size,
|
||||
void *uk_task_ptr, _thread_entry_t thread_func,
|
||||
void *arg1, void *arg2, void *arg3,
|
||||
int priority, unsigned options)
|
||||
|
|
|
@ -245,7 +245,7 @@ __asm__("\t.globl _thread_entry\n"
|
|||
*
|
||||
* @return opaque pointer to initialized k_thread structure
|
||||
*/
|
||||
void _new_thread(char *pStackMem, unsigned stackSize,
|
||||
void _new_thread(char *pStackMem, size_t stackSize,
|
||||
void *uk_task_ptr, _thread_entry_t pEntry,
|
||||
void *parameter1, void *parameter2, void *parameter3,
|
||||
int priority, unsigned options)
|
||||
|
|
|
@ -152,10 +152,10 @@ typedef void (*k_thread_entry_t)(void *p1, void *p2, void *p3);
|
|||
*
|
||||
* @return ID of new thread.
|
||||
*/
|
||||
extern k_tid_t k_thread_spawn(char *stack, unsigned stack_size,
|
||||
extern k_tid_t k_thread_spawn(char *stack, size_t stack_size,
|
||||
k_thread_entry_t entry,
|
||||
void *p1, void *p2, void *p3,
|
||||
int32_t prio, uint32_t options, int32_t delay);
|
||||
int prio, uint32_t options, int32_t delay);
|
||||
|
||||
/**
|
||||
* @brief Put the current thread to sleep.
|
||||
|
@ -1391,7 +1391,7 @@ static inline int k_work_pending(struct k_work *work)
|
|||
* @return N/A
|
||||
*/
|
||||
extern void k_work_q_start(struct k_work_q *work_q, char *stack,
|
||||
unsigned stack_size, unsigned prio);
|
||||
size_t stack_size, int prio);
|
||||
|
||||
/**
|
||||
* @brief Initialize a delayed work item.
|
||||
|
|
|
@ -54,7 +54,7 @@ typedef void (*_thread_entry_t)(void *, void *, void *);
|
|||
extern void _thread_entry(void (*)(void *, void *, void *),
|
||||
void *, void *, void *);
|
||||
|
||||
extern void _new_thread(char *pStack, unsigned stackSize,
|
||||
extern void _new_thread(char *pStack, size_t stackSize,
|
||||
void *uk_task_ptr,
|
||||
void (*pEntry)(void *, void *, void *),
|
||||
void *p1, void *p2, void *p3,
|
||||
|
|
|
@ -230,10 +230,10 @@ static void schedule_new_thread(struct k_thread *thread, int32_t delay)
|
|||
#endif
|
||||
}
|
||||
|
||||
k_tid_t k_thread_spawn(char *stack, unsigned stack_size,
|
||||
k_tid_t k_thread_spawn(char *stack, size_t stack_size,
|
||||
void (*entry)(void *, void *, void*),
|
||||
void *p1, void *p2, void *p3,
|
||||
int32_t prio, uint32_t options, int32_t delay)
|
||||
int prio, uint32_t options, int32_t delay)
|
||||
{
|
||||
__ASSERT(!_is_in_isr(), "");
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ static void work_q_main(void *work_q_ptr, void *p2, void *p3)
|
|||
}
|
||||
|
||||
void k_work_q_start(struct k_work_q *work_q, char *stack,
|
||||
unsigned stack_size, unsigned prio)
|
||||
size_t stack_size, int prio)
|
||||
{
|
||||
k_fifo_init(&work_q->fifo);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue