Changeset 4760793 in mainline for kernel/generic/src/main/main.c


Ignore:
Timestamp:
2024-01-14T18:23:40Z (4 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
5663872, c7ceacf
Parents:
3b68542
Message:

Add CPU_LOCAL alongside CPU and segregate fields that are only used locally

This makes it more clear which fields can be used without synchronization
and which need more care.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/main/main.c

    r3b68542 r4760793  
    328328        ARCH_OP(post_cpu_init);
    329329
    330         current_copy(CURRENT, (current_t *) CPU->stack);
     330        current_copy(CURRENT, (current_t *) CPU_LOCAL->stack);
    331331
    332332        /*
     
    338338        context_save(&ctx);
    339339        context_set(&ctx, FADDR(main_ap_separated_stack),
    340             (uintptr_t) CPU->stack, STACK_SIZE);
     340            (uintptr_t) CPU_LOCAL->stack, STACK_SIZE);
    341341        context_restore(&ctx);
    342342        /* not reached */
Note: See TracChangeset for help on using the changeset viewer.