Changeset 2f57690 in mainline for kernel/generic/src/main/kinit.c
- Timestamp:
- 2009-03-03T12:41:39Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- deca67b
- Parents:
- 561db3f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/main/kinit.c
r561db3f r2f57690 33 33 /** 34 34 * @file 35 * @brief 35 * @brief Kernel initialization thread. 36 36 * 37 37 * This file contains kinit kernel thread which carries out … … 81 81 #endif 82 82 83 #define BOOT_PREFIX 84 #define BOOT_PREFIX_LEN 83 #define BOOT_PREFIX "boot:" 84 #define BOOT_PREFIX_LEN 5 85 85 86 86 /** Kernel initialization thread. … … 98 98 thread_t *thread; 99 99 #endif 100 100 101 101 /* 102 102 * Detach kinit as nobody will call thread_join_timeout() on it. 103 103 */ 104 104 thread_detach(THREAD); 105 105 106 106 interrupts_disable(); 107 108 #ifdef CONFIG_SMP 107 108 #ifdef CONFIG_SMP 109 109 if (config.cpu_count > 1) { 110 110 waitq_initialize(&ap_completion_wq); … … 126 126 thread_detach(thread); 127 127 } 128 #endif /* CONFIG_SMP */ 129 130 #ifdef CONFIG_SMP 128 131 129 if (config.cpu_count > 1) { 132 130 count_t i; … … 144 142 } else 145 143 printf("Unable to create kcpulb thread for cpu" PRIc "\n", i); 146 147 144 } 148 145 } … … 153 150 */ 154 151 arch_post_smp_init(); 155 152 156 153 #ifdef CONFIG_KCONSOLE 157 154 if (stdin) { … … 180 177 continue; 181 178 } 182 179 183 180 /* 184 181 * Construct task name from the 'boot:' prefix and the 185 182 * name stored in the init structure (if any). 186 183 */ 187 188 char namebuf[TASK_NAME_BUFLEN], *name; 189 184 185 char namebuf[TASK_NAME_BUFLEN]; 186 char *name; 187 190 188 name = init.tasks[i].name; 191 if (name[0] == '\0') name = "<unknown>"; 192 189 if (name[0] == '\0') 190 name = "<unknown>"; 191 193 192 ASSERT(TASK_NAME_BUFLEN >= BOOT_PREFIX_LEN); 194 193 strncpy(namebuf, BOOT_PREFIX, TASK_NAME_BUFLEN); … … 234 233 } 235 234 } 236 235 237 236 #ifdef CONFIG_KCONSOLE 238 237 if (!stdin) {
Note:
See TracChangeset
for help on using the changeset viewer.