tests/kernel/smp: make 64-bit clean
Just housekeeping around the casting between void * arguments to thread functions and integer types. Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This commit is contained in:
parent
f7cfb4303b
commit
12287985fb
1 changed files with 6 additions and 6 deletions
|
@ -118,7 +118,7 @@ static void child_fn(void *p1, void *p2, void *p3)
|
|||
{
|
||||
ARG_UNUSED(p2);
|
||||
ARG_UNUSED(p3);
|
||||
int parent_cpu_id = (int)p1;
|
||||
int parent_cpu_id = POINTER_TO_INT(p1);
|
||||
|
||||
zassert_true(parent_cpu_id != z_arch_curr_cpu()->id,
|
||||
"Parent isn't on other core");
|
||||
|
@ -142,8 +142,8 @@ void test_cpu_id_threads(void)
|
|||
|
||||
int parent_cpu_id = z_arch_curr_cpu()->id;
|
||||
|
||||
k_tid_t tid = k_thread_create(&t2, t2_stack, T2_STACK_SIZE,
|
||||
child_fn, (void *)parent_cpu_id, NULL,
|
||||
k_tid_t tid = k_thread_create(&t2, t2_stack, T2_STACK_SIZE, child_fn,
|
||||
INT_TO_POINTER(parent_cpu_id), NULL,
|
||||
NULL, K_PRIO_PREEMPT(2), 0, K_NO_WAIT);
|
||||
|
||||
while (sync_count == -1) {
|
||||
|
@ -157,7 +157,7 @@ static void thread_entry(void *p1, void *p2, void *p3)
|
|||
{
|
||||
ARG_UNUSED(p2);
|
||||
ARG_UNUSED(p3);
|
||||
int thread_num = (int)p1;
|
||||
int thread_num = POINTER_TO_INT(p1);
|
||||
int count = 0;
|
||||
|
||||
tinfo[thread_num].executed = 1;
|
||||
|
@ -197,7 +197,7 @@ static void spawn_threads(int prio, int thread_num,
|
|||
}
|
||||
tinfo[i].tid = k_thread_create(&tthread[i], tstack[i],
|
||||
STACK_SIZE, thread_entry,
|
||||
(void *)i, NULL, NULL,
|
||||
INT_TO_POINTER(i), NULL, NULL,
|
||||
tinfo[i].priority, 0, delay);
|
||||
if (delay) {
|
||||
/* Increase delay for each thread */
|
||||
|
@ -353,7 +353,7 @@ static void thread_wakeup_entry(void *p1, void *p2, void *p3)
|
|||
{
|
||||
ARG_UNUSED(p2);
|
||||
ARG_UNUSED(p3);
|
||||
int thread_num = (int)p1;
|
||||
int thread_num = POINTER_TO_INT(p1);
|
||||
|
||||
thread_started[thread_num] = 1;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue