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


Ignore:
Timestamp:
2017-08-20T14:53:21Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3f74275
Parents:
49115ac
Message:

Hide kobject implementation details

File:
1 edited

Legend:

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

    r49115ac re7ac23d0  
    168168       
    169169        list_initialize(&task->threads);
    170 
    171         task->kobject = malloc(sizeof(kobject_t) * MAX_KERNEL_OBJECTS, 0);
     170       
     171        kobject_task_alloc(task);
    172172       
    173173        ipc_answerbox_init(&task->answerbox, task);
     
    190190        task_t *task = (task_t *) obj;
    191191       
    192         free(task->kobject);
     192        kobject_task_free(task);
    193193        return 0;
    194194}
     
    215215        task->kcycles = 0;
    216216
    217         int cap;
    218         for (cap = 0; cap < MAX_KERNEL_OBJECTS; cap++)
    219                 kobject_initialize(&task->kobject[cap]);
     217        kobject_task_init(task);
    220218
    221219        task->ipc_info.call_sent = 0;
     
    626624       
    627625        if (*additional) {
    628                 int i;
    629                 for (i = 0; i < MAX_KERNEL_OBJECTS; i++) {
    630                         phone_t *phone = phone_get(task, i);
    631                         if (phone && phone->callee)
    632                                 printf(" %d:%p", i, phone->callee);
     626                for_each_kobject(task, ko, KOBJECT_TYPE_PHONE) {
     627                        phone_t *phone = &ko->phone;
     628                        if (phone->callee)
     629                                printf(" %d:%p", kobject_to_cap(task, ko),
     630                                    phone->callee);
    633631                }
    634632                printf("\n");
Note: See TracChangeset for help on using the changeset viewer.