Changeset 26a8604f in mainline for src/proc/thread.c


Ignore:
Timestamp:
2005-02-25T11:48:31Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
397c77f
Parents:
453ba46
Message:

Be more careful when sending IPI on UP configured as SMP.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/proc/thread.c

    r453ba46 r26a8604f  
    4747#include <list.h>
    4848#include <config.h>
    49 
    50 #ifdef __SMP__
    5149#include <arch/interrupt.h>
    52 #include <arch/apic.h>
    53 #endif /* __SMP__ */
     50#include <smp/ipi.h>
    5451
    5552char *thread_states[] = {"Invalid", "Running", "Sleeping", "Ready", "Entering", "Exiting"};
     
    123120
    124121        spinlock_lock(&cpu->lock);
    125         if ((++cpu->nrdy) > avg && (config.cpu_active == config.cpu_count)) {
     122        if ((++cpu->nrdy) > avg) {
    126123                /*
    127124                 * If there are idle halted CPU's, this will wake them up.
    128125                 */
    129                 #ifdef __SMP__
    130126                ipi_broadcast(VECTOR_WAKEUP_IPI);
    131                 #endif /* __SMP__  */
    132127        }       
    133128        spinlock_unlock(&cpu->lock);
Note: See TracChangeset for help on using the changeset viewer.