Changeset daadfa6 in mainline


Ignore:
Timestamp:
2023-02-10T15:18:53Z (17 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1871118
Parents:
e994898
Message:

Remove unnecessary context field from cpu_t structure

Location:
kernel/generic
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/cpu.h

    re994898 rdaadfa6  
    5555        tlb_shootdown_msg_t tlb_messages[TLB_MESSAGE_QUEUE_LEN];
    5656        size_t tlb_messages_count;
    57 
    58         context_t saved_context;
    5957
    6058        atomic_size_t nrdy;
  • kernel/generic/src/main/main.c

    re994898 rdaadfa6  
    364364         * switch to this cpu's private stack prior to waking kmp up.
    365365         */
    366         context_save(&CPU->saved_context);
    367         context_set(&CPU->saved_context, FADDR(main_ap_separated_stack),
     366        context_t ctx;
     367        context_save(&ctx);
     368        context_set(&ctx, FADDR(main_ap_separated_stack),
    368369            (uintptr_t) CPU->stack, STACK_SIZE);
    369         context_restore(&CPU->saved_context);
     370        context_restore(&ctx);
    370371        /* not reached */
    371372}
  • kernel/generic/src/proc/scheduler.c

    re994898 rdaadfa6  
    371371         *
    372372         */
    373         context_save(&CPU->saved_context);
    374         context_set(&CPU->saved_context, FADDR(scheduler_separated_stack),
     373        context_t ctx;
     374        context_save(&ctx);
     375        context_set(&ctx, FADDR(scheduler_separated_stack),
    375376            (uintptr_t) CPU->stack, STACK_SIZE);
    376         context_restore(&CPU->saved_context);
     377        context_restore(&ctx);
    377378
    378379        /* Not reached */
Note: See TracChangeset for help on using the changeset viewer.