Changeset ea3fb2e in mainline


Ignore:
Timestamp:
2005-05-12T18:02:15Z (20 years ago)
Author:
Jakub Vana <jakub.vana@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f2ffad4
Parents:
c884ef1
Message:

Move fpu_owner pointer from cpu_arch_t to cpu_t.

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/include/cpu.h

    rc884ef1 rea3fb2e  
    4848        int stepping;
    4949        struct tss *tss;
    50         thread_t *fpu_owner;
    5150};
    5251
  • arch/ia32/src/cpu/cpu.c

    rc884ef1 rea3fb2e  
    9393{
    9494        CPU->arch.tss = tss_p;
    95         CPU->arch.fpu_owner=NULL;
     95        CPU->fpu_owner=NULL;
    9696}
    9797
  • arch/ia32/src/fpu_context.c

    rc884ef1 rea3fb2e  
    4141void fpu_context_restore(fpu_context_t *fctx)
    4242{
    43         if(THREAD==CPU->arch.fpu_owner) {reset_TS_flag(); }
    44         else {set_TS_flag(); ((CPU->arch).fpu_owner)->fpu_context_engaged=1;}
     43        if(THREAD==CPU->fpu_owner) {reset_TS_flag(); }
     44        else {set_TS_flag(); (CPU->fpu_owner)->fpu_context_engaged=1;}
    4545}
    4646
  • arch/ia32/src/interrupt.c

    rc884ef1 rea3fb2e  
    8989{
    9090
    91         if (((CPU->arch).fpu_owner)!=NULL)
     91        if ((CPU->fpu_owner)!=NULL)
    9292        { 
    93                 fpu_lazy_context_save(&(((CPU->arch).fpu_owner)->saved_fpu_context));
    94                 ((CPU->arch).fpu_owner)->fpu_context_engaged=0; /* Enables migration */
     93                fpu_lazy_context_save(&((CPU->fpu_owner)->saved_fpu_context));
     94                (CPU->fpu_owner)->fpu_context_engaged=0; /* Enables migration */
    9595        }
    9696       
     
    9898        else {fpu_init();THREAD->fpu_context_exists=1;}
    9999
    100         (CPU->arch).fpu_owner=THREAD;
     100        CPU->fpu_owner=THREAD;
    101101
    102102        reset_TS_flag();
  • include/cpu.h

    rc884ef1 rea3fb2e  
    6767
    6868        cpu_arch_t arch;
     69
     70        thread_t *fpu_owner;
    6971       
    7072        __u8 *stack;
  • src/Makefile.config

    rc884ef1 rea3fb2e  
    1 ARCH=ia32
     1#ARCH=ia32
    22#ARCH=mips
    3 #ARCH=ia64
     3ARCH=ia64
    44#ARCH=powerpc
    55#ARCH=amd64
  • src/proc/scheduler.c

    rc884ef1 rea3fb2e  
    270270
    271271                            spinlock_lock(&THREAD->cpu->lock);
    272                             if(THREAD->cpu->arch.fpu_owner==THREAD) THREAD->cpu->arch.fpu_owner=NULL;
     272                            if(THREAD->cpu->fpu_owner==THREAD) THREAD->cpu->fpu_owner=NULL;
    273273                            spinlock_unlock(&THREAD->cpu->lock);
    274274
Note: See TracChangeset for help on using the changeset viewer.