- Timestamp:
- 2005-04-10T16:36:45Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 23c0c08
- Parents:
- 43114c5
- Location:
- src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Makefile.config
r43114c5 r8262010 12 12 13 13 # Deadlock detection support for spinlocks. 14 DEBUG_SPINLOCK=DEBUG_SPINLOCK14 #DEBUG_SPINLOCK=DEBUG_SPINLOCK 15 15 16 16 # Uncomment if you want to run in the test mode -
src/cpu/cpu.c
r43114c5 r8262010 40 40 #include <list.h> 41 41 42 cpu_private_page_t *the = NULL; 43 42 cpu_private_data_t *cpu_private_data; 44 43 cpu_t *cpus; 45 44 … … 50 49 if (config.cpu_active == 1) { 51 50 #endif /* __SMP__ */ 51 cpu_private_data = (cpu_private_data_t *) malloc(sizeof(cpu_private_data_t) * config.cpu_count); 52 if (!cpu_private_data) 53 panic("malloc/cpu_private_data"); 54 52 55 cpus = (cpu_t *) malloc(sizeof(cpu_t) * config.cpu_count); 53 56 if (!cpus) … … 55 58 56 59 /* initialize everything */ 60 memsetb((__address) cpu_private_data, sizeof(cpu_private_data_t) * config.cpu_count, 0); 57 61 memsetb((__address) cpus, sizeof(cpu_t) * config.cpu_count, 0); 58 62 … … 71 75 list_initialize(&cpus[i].rq[j].rq_head); 72 76 } 77 78 cpu_private_data[i].cpu = &cpus[i]; 73 79 } 74 80 75 the = (cpu_private_page_t *) frame_alloc(FRAME_KA | FRAME_PANIC);76 memsetb((__address) the, PAGE_SIZE, 0);77 81 #ifdef __SMP__ 78 }79 else {80 __address frame;81 82 frame = frame_alloc(FRAME_KA | FRAME_PANIC);83 memsetb(frame, PAGE_SIZE, 0);84 map_page_to_frame((__address) the, frame, PAGE_CACHEABLE, 1);85 82 } 86 83 #endif /* __SMP__ */ 87 84 88 CPU = &cpus[config.cpu_active-1];89 85 cpu_identify(); 90 86 cpu_arch_init(); -
src/main/main.c
r43114c5 r8262010 104 104 arch_init(); 105 105 106 106 107 printf("%s, %s\n", project, copyright); 107 108 -
src/proc/thread.c
r43114c5 r8262010 100 100 i = (t->pri < RQ_COUNT -1) ? ++t->pri : t->pri; 101 101 102 cpu = the->cpu;102 cpu = CPU; 103 103 if (t->flags & X_WIRED) { 104 104 cpu = t->cpu;
Note:
See TracChangeset
for help on using the changeset viewer.