- Timestamp:
- 2005-02-23T11:48:52Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3418c41
- Parents:
- b109ebb
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mm/tlb.c
rb109ebb r4ffa9e0 28 28 29 29 #include <mm/tlb.h> 30 #include <smp/ipi.h> 30 31 #include <synch/spinlock.h> 31 32 #include <typedefs.h> 32 33 #include <arch/atomic.h> 34 #include <arch/interrupt.h> 33 35 #include <config.h> 34 36 … … 60 62 } 61 63 64 void tlb_shootdown_ipi_send(void) 65 { 66 ipi_broadcast(VECTOR_TLB_SHOOTDOWN_IPI); 67 } 68 62 69 void tlb_shootdown_ipi_recv(void) 63 70 { -
src/proc/thread.c
rb109ebb r4ffa9e0 46 46 #include <time/clock.h> 47 47 #include <list.h> 48 #include <config.h> 49 50 #ifdef __SMP__ 51 #include <arch/interrupt.h> 52 #include <arch/apic.h> 53 #endif /* __SMP__ */ 48 54 49 55 char *thread_states[] = {"Invalid", "Running", "Sleeping", "Ready", "Entering", "Exiting"}; … … 89 95 runq_t *r; 90 96 pri_t pri; 91 int i ;97 int i, avg, send_ipi = 0; 92 98 93 99 pri = cpu_priority_high(); … … 113 119 114 120 spinlock_lock(&nrdylock); 115 nrdy++;121 avg = ++nrdy / config.cpu_active; 116 122 spinlock_unlock(&nrdylock); 117 123 118 124 spinlock_lock(&cpu->lock); 119 cpu->nrdy++; 125 if ((++cpu->nrdy) > avg && (config.cpu_active == config.cpu_count)) { 126 /* 127 * If there are idle halted CPU's, this will wake them up. 128 */ 129 #ifdef __SMP__ 130 l_apic_broadcast_custom_ipi(VECTOR_WAKEUP_IPI); 131 #endif /* __SMP__ */ 132 } 120 133 spinlock_unlock(&cpu->lock); 121 134
Note:
See TracChangeset
for help on using the changeset viewer.