- Timestamp:
- 2005-08-30T17:41:19Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b45aa23
- Parents:
- 10caad0
- Location:
- src
- Files:
-
- 4 edited
-
Makefile.config (modified) (2 diffs)
-
cpu/cpu.c (modified) (4 diffs)
-
main/main.c (modified) (3 diffs)
-
proc/scheduler.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Makefile.config
r10caad0 r7ce9284 21 21 22 22 # Uncomment if you want to run in the test mode 23 TEST=__TEST__23 #TEST=__TEST__ 24 24 25 25 TEST_FILE=test.c … … 34 34 #TEST_DIR=synch/semaphore2/ 35 35 #TEST_DIR=fpu/fpu1 36 TEST_DIR=print/print136 #TEST_DIR=print/print1 -
src/cpu/cpu.c
r10caad0 r7ce9284 40 40 #include <list.h> 41 41 42 43 cpu_private_data_t *cpu_private_data;44 42 cpu_t *cpus; 45 46 43 47 44 /** Initialize CPUs … … 56 53 if (config.cpu_active == 1) { 57 54 #endif /* __SMP__ */ 58 cpu_private_data = (cpu_private_data_t *) malloc(sizeof(cpu_private_data_t) * config.cpu_count);59 if (!cpu_private_data)60 panic("malloc/cpu_private_data");61 62 55 cpus = (cpu_t *) malloc(sizeof(cpu_t) * config.cpu_count); 63 56 if (!cpus) … … 65 58 66 59 /* initialize everything */ 67 memsetb((__address) cpu_private_data, sizeof(cpu_private_data_t) * config.cpu_count, 0);68 60 memsetb((__address) cpus, sizeof(cpu_t) * config.cpu_count, 0); 69 61 70 62 for (i=0; i < config.cpu_count; i++) { 71 cpus[i].stack = (__u8 *) malloc(CPU_STACK_SIZE);63 cpus[i].stack = (__u8 *) frame_alloc(FRAME_KA | FRAME_PANIC); 72 64 if (!cpus[i].stack) 73 65 panic("malloc/cpus[%d].stack\n", i); … … 87 79 } 88 80 #endif /* __SMP__ */ 81 82 CPU = &cpus[config.cpu_active-1]; 89 83 90 84 CPU->active = 1; -
src/main/main.c
r10caad0 r7ce9284 180 180 t = thread_create(kinit, NULL, k, 0); 181 181 if (!t) panic("can't create kinit thread\n"); 182 183 182 thread_ready(t); 184 183 … … 211 210 config.cpu_active++; 212 211 212 /* 213 * The THE structure is well defined because ctx.sp is used as stack. 214 */ 215 the_initialize(THE); 216 213 217 arch_pre_mm_init(); 214 218 frame_init(); … … 222 226 l_apic_debug(); 223 227 228 the_copy(THE, (the_t *) CPU->stack); 224 229 225 230 /* -
src/proc/scheduler.c
r10caad0 r7ce9284 364 364 priority = THREAD->pri; 365 365 spinlock_unlock(&THREAD->lock); 366 366 367 367 relink_rq(priority); 368 368
Note:
See TracChangeset
for help on using the changeset viewer.
