Changeset 6a27d63 in mainline for src/proc/scheduler.c


Ignore:
Timestamp:
2005-05-11T21:53:09Z (20 years ago)
Author:
Jakub Vana <jakub.vana@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c884ef1
Parents:
6ba143d
Message:

Finished FPU lazy context switching - first version. I have not tested it and there are many things which must be changed when
it runs first time OK.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/proc/scheduler.c

    r6ba143d r6a27d63  
    268268                            list_remove(&THREAD->threads_link);
    269269                            spinlock_unlock(&threads_lock);
     270
     271                            spinlock_lock(&THREAD->cpu->lock);
     272                            if(THREAD->cpu->arch.fpu_owner==THREAD) THREAD->cpu->arch.fpu_owner=NULL;
     273                            spinlock_unlock(&THREAD->cpu->lock);
     274
    270275                           
    271276                            free(THREAD);
     
    428433                                 * We don't want to steal CPU-wired threads neither threads already stolen.
    429434                                 * The latter prevents threads from migrating between CPU's without ever being run.
    430                                  */
     435                                 * We don't want to steal threads whose FPU context is still in CPU
     436                                 */
    431437                                spinlock_lock(&t->lock);
    432                                 if (!(t->flags & (X_WIRED | X_STOLEN))) {
     438                                if ( (!(t->flags & (X_WIRED | X_STOLEN))) && (!(t->fpu_context_engaged)) ) {
    433439                                        /*
    434440                                         * Remove t from r.
Note: See TracChangeset for help on using the changeset viewer.