Changeset 4b2c872d in mainline for src


Ignore:
Timestamp:
2005-10-18T09:33:02Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8005218
Parents:
22f7769
Message:

Create generic context_save() and context_restore().
These two functions are defined inline and only call context_save_arch() and context_restore_arch(), respectively.
The main purpose of this is to enable centralized commenting of these important and tricky functions.

Location:
src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/main/main.c

    r22f7769 r4b2c872d  
    247247         * switch to this cpu's private stack prior to waking kmp up.
    248248         */
    249         context_set(&CPU->saved_context, FADDR(main_ap_separated_stack), CPU->stack, CPU_STACK_SIZE);
     249        context_set(&CPU->saved_context, FADDR(main_ap_separated_stack), (__address) CPU->stack, CPU_STACK_SIZE);
    250250        context_restore(&CPU->saved_context);
    251251        /* not reached */
  • src/proc/scheduler.c

    r22f7769 r4b2c872d  
    314314         */
    315315        context_save(&CPU->saved_context);
    316         context_set(&CPU->saved_context, FADDR(scheduler_separated_stack), CPU->stack, CPU_STACK_SIZE);
     316        context_set(&CPU->saved_context, FADDR(scheduler_separated_stack), (__address) CPU->stack, CPU_STACK_SIZE);
    317317        context_restore(&CPU->saved_context);
    318318        /* not reached */
  • src/proc/thread.c

    r22f7769 r4b2c872d  
    196196               
    197197                context_save(&t->saved_context);
    198                 context_set(&t->saved_context, FADDR(cushion), t->kstack, THREAD_STACK_SIZE);
     198                context_set(&t->saved_context, FADDR(cushion), (__address) t->kstack, THREAD_STACK_SIZE);
    199199               
    200200                the_initialize((the_t *) t->kstack);
  • src/synch/waitq.c

    r22f7769 r4b2c872d  
    3131#include <synch/spinlock.h>
    3232#include <proc/thread.h>
     33#include <proc/scheduler.h>
    3334#include <arch/asm.h>
    3435#include <arch/types.h>
Note: See TracChangeset for help on using the changeset viewer.