Changeset 5f85c91 in mainline for generic/src
- Timestamp:
- 2005-11-08T12:22:35Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 36a140b
- Parents:
- 389f41e
- Location:
- generic/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/cpu/cpu.c
r389f41e r5f85c91 50 50 int i, j; 51 51 52 #ifdef __SMP__52 #ifdef CONFIG_SMP 53 53 if (config.cpu_active == 1) { 54 #endif /* __SMP__*/54 #endif /* CONFIG_SMP */ 55 55 cpus = (cpu_t *) malloc(sizeof(cpu_t) * config.cpu_count); 56 56 if (!cpus) … … 67 67 cpus[i].id = i; 68 68 69 #ifdef __SMP__69 #ifdef CONFIG_SMP 70 70 waitq_initialize(&cpus[i].kcpulb_wq); 71 71 #endif /* __SMP */ … … 76 76 } 77 77 78 #ifdef __SMP__78 #ifdef CONFIG_SMP 79 79 } 80 #endif /* __SMP__*/80 #endif /* CONFIG_SMP */ 81 81 82 82 CPU = &cpus[config.cpu_active-1]; -
generic/src/main/kinit.c
r389f41e r5f85c91 44 44 #include <memstr.h> 45 45 46 #ifdef __SMP__46 #ifdef CONFIG_SMP 47 47 #include <arch/smp/mps.h> 48 #endif /* __SMP__*/48 #endif /* CONFIG_SMP */ 49 49 50 50 #include <synch/waitq.h> … … 67 67 interrupts_disable(); 68 68 69 #ifdef __SMP__69 #ifdef CONFIG_SMP 70 70 if (config.cpu_count > 1) { 71 71 /* … … 85 85 else panic("thread_create/kmp"); 86 86 } 87 #endif /* __SMP__*/87 #endif /* CONFIG_SMP */ 88 88 /* 89 89 * Now that all CPUs are up, we can report what we've found. … … 96 96 } 97 97 98 #ifdef __SMP__98 #ifdef CONFIG_SMP 99 99 if (config.cpu_count > 1) { 100 100 /* … … 114 114 } 115 115 } 116 #endif /* __SMP__*/116 #endif /* CONFIG_SMP */ 117 117 118 118 interrupts_enable(); -
generic/src/main/main.c
r389f41e r5f85c91 40 40 #include <align.h> 41 41 42 #ifdef __SMP__42 #ifdef CONFIG_SMP 43 43 #include <arch/smp/apic.h> 44 44 #include <arch/smp/mps.h> 45 #endif /* __SMP__*/45 #endif /* CONFIG_SMP */ 46 46 47 47 #include <smp/smp.h> … … 203 203 204 204 205 #ifdef __SMP__205 #ifdef CONFIG_SMP 206 206 /** Application CPUs main kernel routine 207 207 * … … 269 269 /* not reached */ 270 270 } 271 #endif /* __SMP__*/271 #endif /* CONFIG_SMP */ -
generic/src/mm/tlb.c
r389f41e r5f85c91 37 37 #include <arch.h> 38 38 39 #ifdef __SMP__39 #ifdef CONFIG_SMP 40 40 static spinlock_t tlblock; 41 41 #endif … … 49 49 } 50 50 51 #ifdef __SMP__51 #ifdef CONFIG_SMP 52 52 /* must be called with interrupts disabled */ 53 53 void tlb_shootdown_start(void) … … 85 85 CPU->tlb_active = 1; 86 86 } 87 #endif /* __SMP__*/87 #endif /* CONFIG_SMP */ -
generic/src/proc/scheduler.c
r389f41e r5f85c91 62 62 { 63 63 before_thread_runs_arch(); 64 #ifdef FPU_LAZY64 #ifdef CONFIG_FPU_LAZY 65 65 if(THREAD==CPU->fpu_owner) 66 66 fpu_enable(); … … 78 78 } 79 79 80 #ifdef FPU_LAZY80 #ifdef CONFIG_FPU_LAZY 81 81 void scheduler_fpu_lazy_request(void) 82 82 { … … 135 135 136 136 if (n == 0) { 137 #ifdef __SMP__137 #ifdef CONFIG_SMP 138 138 /* 139 139 * If the load balancing thread is not running, wake it up and … … 144 144 goto loop; 145 145 } 146 #endif /* __SMP__*/146 #endif /* CONFIG_SMP */ 147 147 148 148 /* … … 413 413 if (THREAD) { 414 414 spinlock_lock(&THREAD->lock); 415 #ifndef FPU_LAZY415 #ifndef CONFIG_FPU_LAZY 416 416 fpu_context_save(&(THREAD->saved_fpu_context)); 417 417 #endif … … 463 463 464 464 465 #ifdef __SMP__465 #ifdef CONFIG_SMP 466 466 /** Load balancing thread 467 467 * … … 624 624 } 625 625 626 #endif /* __SMP__*/626 #endif /* CONFIG_SMP */ -
generic/src/smp/ipi.c
r389f41e r5f85c91 27 27 */ 28 28 29 #ifdef __SMP__29 #ifdef CONFIG_SMP 30 30 31 31 #include <smp/ipi.h> … … 45 45 * Provisions must be made to avoid sending IPI: 46 46 * - before all CPU's were configured to accept the IPI 47 * - if there is only one CPU but the kernel was compiled with __SMP__47 * - if there is only one CPU but the kernel was compiled with CONFIG_SMP 48 48 */ 49 49 … … 52 52 } 53 53 54 #endif /* __SMP__*/54 #endif /* CONFIG_SMP */ -
generic/src/synch/spinlock.c
r389f41e r5f85c91 35 35 #include <debug.h> 36 36 37 #ifdef __SMP__37 #ifdef CONFIG_SMP 38 38 39 39 /** Initialize spinlock … … 48 48 } 49 49 50 #ifdef DEBUG_SPINLOCK50 #ifdef CONFIG_DEBUG_SPINLOCK 51 51 /** Lock spinlock 52 52 *
Note:
See TracChangeset
for help on using the changeset viewer.