Changeset 26a8604f in mainline


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.

Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/smp/ipi.c

    r453ba46 r26a8604f  
    3232#include <arch/apic.h>
    3333
    34 void ipi_broadcast(int ipi)
     34void ipi_broadcast_arch(int ipi)
    3535{
    3636        (void) l_apic_broadcast_custom_ipi((__u8) ipi);
  • include/smp/ipi.h

    r453ba46 r26a8604f  
    3232#ifdef __SMP__
    3333extern void ipi_broadcast(int ipi);
     34extern void ipi_broadcast_arch(int ipi);
     35#else
     36#define ipi_broadcast(x)        ;
    3437#endif /* __SMP__ */
    3538
  • src/Makefile

    r453ba46 r26a8604f  
    2525        synch/mutex.c \
    2626        synch/semaphore.c \
    27         synch/waitq.c
     27        synch/waitq.c \
     28        smp/ipi.c
    2829
    2930ifdef DEBUG_SPINLOCK
  • 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.