kernel: centralize new thread priority check
This was being done inconsistently in arch_new_thread(), just move to the core kernel. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
c0df99cc77
commit
1f6f977f05
8 changed files with 2 additions and 10 deletions
|
@ -64,7 +64,6 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
|
|||
int priority, unsigned int options)
|
||||
{
|
||||
char *pStackMem = Z_THREAD_STACK_BUFFER(stack);
|
||||
Z_ASSERT_VALID_PRIO(priority, pEntry);
|
||||
|
||||
char *stackEnd;
|
||||
char *stackAdjEnd;
|
||||
|
|
|
@ -38,8 +38,6 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
|
|||
/* Offset between the top of stack and the high end of stack area. */
|
||||
u32_t top_of_stack_offset = 0U;
|
||||
|
||||
Z_ASSERT_VALID_PRIO(priority, pEntry);
|
||||
|
||||
#if defined(CONFIG_USERSPACE)
|
||||
/* Truncate the stack size to align with the MPU region granularity.
|
||||
* This is done proactively to account for the case when the thread
|
||||
|
|
|
@ -34,8 +34,6 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
|
|||
int priority, unsigned int options)
|
||||
{
|
||||
char *stack_memory = Z_THREAD_STACK_BUFFER(stack);
|
||||
Z_ASSERT_VALID_PRIO(priority, thread_func);
|
||||
|
||||
struct init_stack_frame *iframe;
|
||||
|
||||
z_new_thread_init(thread, stack_memory, stack_size);
|
||||
|
|
|
@ -32,8 +32,6 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
|
|||
|
||||
char *stack_memory = Z_THREAD_STACK_BUFFER(stack);
|
||||
|
||||
Z_ASSERT_VALID_PRIO(priority, thread_func);
|
||||
|
||||
posix_thread_status_t *thread_status;
|
||||
|
||||
z_new_thread_init(thread, stack_memory, stack_size);
|
||||
|
|
|
@ -18,7 +18,6 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
|
|||
int priority, unsigned int options)
|
||||
{
|
||||
char *stack_memory = Z_THREAD_STACK_BUFFER(stack);
|
||||
Z_ASSERT_VALID_PRIO(priority, thread_func);
|
||||
|
||||
struct __esf *stack_init;
|
||||
|
||||
|
|
|
@ -69,7 +69,6 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
|
|||
void *swap_entry;
|
||||
struct _x86_initial_frame *initial_frame;
|
||||
|
||||
Z_ASSERT_VALID_PRIO(priority, entry);
|
||||
stack_buf = Z_THREAD_STACK_BUFFER(stack);
|
||||
z_new_thread_init(thread, stack_buf, stack_size);
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
|
|||
{
|
||||
void *switch_entry;
|
||||
|
||||
Z_ASSERT_VALID_PRIO(priority, entry);
|
||||
z_new_thread_init(thread, Z_THREAD_STACK_BUFFER(stack), stack_size);
|
||||
|
||||
#if CONFIG_X86_STACK_PROTECTION
|
||||
|
|
|
@ -473,6 +473,8 @@ void z_setup_new_thread(struct k_thread *new_thread,
|
|||
void *p1, void *p2, void *p3,
|
||||
int prio, u32_t options, const char *name)
|
||||
{
|
||||
Z_ASSERT_VALID_PRIO(prio, entry);
|
||||
|
||||
#ifdef CONFIG_USERSPACE
|
||||
z_object_init(new_thread);
|
||||
z_object_init(stack);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue