Changeset fb13b44 in mainline for kernel/generic/src
- Timestamp:
- 2019-08-06T19:57:27Z (6 years ago)
- Children:
- 103939e
- Parents:
- d89b259
- git-author:
- Michal Koutný <xm.koutny+hos@…> (2015-08-10 08:35:21)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2019-08-06 19:57:27)
- Location:
- kernel/generic/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/ipc.c
rd89b259 rfb13b44 65 65 static void ipc_forget_call(call_t *); 66 66 67 /** Answerbox that new tasks are automatically connected to*/67 /** Answerbox that is assigned to boot-time tasks */ 68 68 answerbox_t *ipc_box_0 = NULL; 69 69 -
kernel/generic/src/main/main.c
rd89b259 rfb13b44 298 298 * Create kernel task. 299 299 */ 300 task_t *kernel = task_create(AS_KERNEL, "kernel" );300 task_t *kernel = task_create(AS_KERNEL, "kernel", NULL); 301 301 if (!kernel) 302 302 panic("Cannot create kernel task."); -
kernel/generic/src/proc/program.c
rd89b259 rfb13b44 64 64 * @param entry_addr Program entry-point address in program address space. 65 65 * @param name Name to set for the program's task. 66 * @param answerbox Answerbox where box 0 is connected to (may be NULL). 66 67 * @param prg Buffer for storing program information. 67 68 * … … 69 70 * 70 71 */ 71 errno_t program_create(as_t *as, uspace_addr_t entry_addr, char *name, program_t *prg) 72 errno_t program_create(as_t *as, uspace_addr_t entry_addr, char *name, 73 struct answerbox *answerbox, program_t *prg) 72 74 { 73 75 uspace_arg_t *kernel_uarg = (uspace_arg_t *) … … 77 79 78 80 prg->loader_status = EOK; 79 prg->task = task_create(as, name );81 prg->task = task_create(as, name, answerbox); 80 82 if (!prg->task) { 81 83 free(kernel_uarg); … … 157 159 158 160 return program_create(as, ((elf_header_t *) image_addr)->e_entry, 159 name, prg);161 name, ipc_box_0, prg); 160 162 } 161 163 … … 191 193 192 194 return program_create(as, ((elf_header_t *) program_loader)->e_entry, 193 name, prg);195 name, &TASK->answerbox, prg); 194 196 } 195 197 -
kernel/generic/src/proc/task.c
rd89b259 rfb13b44 190 190 /** Create new task with no threads. 191 191 * 192 * @param as Task's address space. 193 * @param name Symbolic name (a copy is made). 192 * @param as Task's address space. 193 * @param name Symbolic name (a copy is made). 194 * @param answerbox (Optional) answerbox where box 0 is connected to. 194 195 * 195 196 * @return New task's structure. 196 197 * 197 198 */ 198 task_t *task_create(as_t *as, const char *name )199 task_t *task_create(as_t *as, const char *name, answerbox_t *answerbox) 199 200 { 200 201 task_t *task = (task_t *) slab_alloc(task_cache, FRAME_ATOMIC); … … 234 235 #endif 235 236 236 if (( ipc_box_0) &&237 (container_check( ipc_box_0->task->container, task->container))) {237 if ((answerbox) && 238 (container_check(answerbox->task->container, task->container))) { 238 239 cap_phone_handle_t phone_handle; 239 240 errno_t rc = phone_alloc(task, true, &phone_handle, NULL); … … 247 248 kobject_t *phone_obj = kobject_get(task, phone_handle, 248 249 KOBJECT_TYPE_PHONE); 249 (void) ipc_phone_connect(phone_obj->phone, ipc_box_0);250 (void) ipc_phone_connect(phone_obj->phone, answerbox); 250 251 } 251 252
Note:
See TracChangeset
for help on using the changeset viewer.