Changeset fb13b44 in mainline for kernel/generic/src/proc/task.c


Ignore:
Timestamp:
2019-08-06T19:57:27Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
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)
Message:

Spawned tasks' phone is connected to spawning task

  • Only boot time tasks are connected to hardcoded NS task.
  • First connected phone of other tasks is connected to the task that spawned them (spawn parent).
  • Until further changes, effectively it changes nothing (NS was the ultimate spawn parent).

Conflicts:

kernel/generic/include/proc/program.h
kernel/generic/src/ipc/ipc.c
kernel/generic/src/proc/program.c
kernel/generic/src/proc/task.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/proc/task.c

    rd89b259 rfb13b44  
    190190/** Create new task with no threads.
    191191 *
    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.
    194195 *
    195196 * @return New task's structure.
    196197 *
    197198 */
    198 task_t *task_create(as_t *as, const char *name)
     199task_t *task_create(as_t *as, const char *name, answerbox_t *answerbox)
    199200{
    200201        task_t *task = (task_t *) slab_alloc(task_cache, FRAME_ATOMIC);
     
    234235#endif
    235236
    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))) {
    238239                cap_phone_handle_t phone_handle;
    239240                errno_t rc = phone_alloc(task, true, &phone_handle, NULL);
     
    247248                kobject_t *phone_obj = kobject_get(task, phone_handle,
    248249                    KOBJECT_TYPE_PHONE);
    249                 (void) ipc_phone_connect(phone_obj->phone, ipc_box_0);
     250                (void) ipc_phone_connect(phone_obj->phone, answerbox);
    250251        }
    251252
Note: See TracChangeset for help on using the changeset viewer.