Changeset d5d2a3f in mainline for src/proc


Ignore:
Timestamp:
2005-05-25T12:29:18Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2998046
Parents:
c23fd6b1
Message:

Add context_set() macro to support extended behaviour for architectures with more than one stack (e.g. IA-64).
Now there is one generic context_set() defined in include/context.h and one IA-64 specific defined in arch/ia64/include/context.h.

Location:
src/proc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/proc/scheduler.c

    rc23fd6b1 rd5d2a3f  
    233233         */
    234234        context_save(&CPU->saved_context);
    235         CPU->saved_context.sp = (__address) &CPU->stack[CPU_STACK_SIZE-SP_DELTA];
    236         CPU->saved_context.pc = FADDR(scheduler_separated_stack);
     235        context_set(&CPU->saved_context, FADDR(scheduler_separated_stack), CPU->stack, CPU_STACK_SIZE);
    237236        context_restore(&CPU->saved_context);
    238237        /* not reached */
  • src/proc/thread.c

    rc23fd6b1 rd5d2a3f  
    166166               
    167167                context_save(&t->saved_context);
    168                 t->saved_context.pc = FADDR(cushion);
    169                 t->saved_context.sp = (__address) &t->kstack[THREAD_STACK_SIZE-SP_DELTA];
     168                context_set(&t->saved_context, FADDR(cushion), t->kstack, THREAD_STACK_SIZE);
    170169
    171170                pri = cpu_priority_high();
Note: See TracChangeset for help on using the changeset viewer.