Changes in kernel/generic/src/main/kinit.c [c8cbd39:b2fa1204] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/main/kinit.c
rc8cbd39 rb2fa1204 59 59 #include <mm/km.h> 60 60 #include <print.h> 61 #include <log.h> 61 62 #include <memstr.h> 62 63 #include <console/console.h> … … 140 141 thread_ready(thread); 141 142 } else 142 printf("Unable to create kcpulb thread for cpu%u\n", i); 143 log(LF_OTHER, LVL_ERROR, 144 "Unable to create kcpulb thread for cpu%u", i); 143 145 } 144 146 } … … 156 158 thread_ready(thread); 157 159 else 158 printf("Unable to create kload thread\n");160 log(LF_OTHER, LVL_ERROR, "Unable to create kload thread"); 159 161 160 162 #ifdef CONFIG_KCONSOLE … … 168 170 thread_ready(thread); 169 171 else 170 printf("Unable to create kconsole thread\n"); 172 log(LF_OTHER, LVL_ERROR, 173 "Unable to create kconsole thread"); 171 174 } 172 175 #endif /* CONFIG_KCONSOLE */ 176 177 /* 178 * Store the default stack size in sysinfo so that uspace can create 179 * stack with this default size. 180 */ 181 sysinfo_set_item_val("default.stack_size", NULL, STACK_SIZE_USER); 173 182 174 183 interrupts_enable(); … … 204 213 for (i = 0; i < init.cnt; i++) { 205 214 if (init.tasks[i].paddr % FRAME_SIZE) { 206 printf("init[%zu]: Address is not frame aligned\n", i); 215 log(LF_OTHER, LVL_ERROR, 216 "init[%zu]: Address is not frame aligned", i); 207 217 programs[i].task = NULL; 208 218 continue; … … 244 254 CAP_IO_MANAGER | CAP_IRQ_REG); 245 255 246 if (!ipc_phone_0) 256 if (!ipc_phone_0) { 247 257 ipc_phone_0 = &programs[i].task->answerbox; 258 /* 259 * Hold the first task so that the 260 * ipc_phone_0 remains a valid pointer 261 * even if the first task exits for 262 * whatever reason. 263 */ 264 task_hold(programs[i].task); 265 } 248 266 } 249 267 … … 259 277 init_rd((void *) init.tasks[i].paddr, init.tasks[i].size); 260 278 } else 261 printf("init[%zu]: Init binary load failed " 262 "(error %d, loader status %u)\n", i, rc, 279 log(LF_OTHER, LVL_ERROR, 280 "init[%zu]: Init binary load failed " 281 "(error %d, loader status %u)", i, rc, 263 282 programs[i].loader_status); 264 283 }
Note:
See TracChangeset
for help on using the changeset viewer.