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


Ignore:
Timestamp:
2017-09-18T20:52:12Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6abfd250
Parents:
e5f5ce0
Message:

Make all accesses to capabilites exclusive

This commit makes sure that all accesses to the capabilities array and other
metadata are protected by a mutex. This is necessary for future resizing of the
capabilities array.

Group task's capabilities by type so that it is possible to visit all
capabilities of the given type effectively.

Provide cap_publish() and cap_unpublish() to automate steps that make the
capability visible/invisible to userspace and insert/remove the capability from
the respective type list.

File:
1 edited

Legend:

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

    re5f5ce0 r9e87562  
    616616        if (*additional)
    617617                printf("%-8" PRIu64 " %9" PRIu64 "%c %9" PRIu64 "%c "
    618                     "%9" PRIua, task->taskid, ucycles, usuffix, kcycles,
     618                    "%9" PRIua "\n", task->taskid, ucycles, usuffix, kcycles,
    619619                    ksuffix, atomic_get(&task->refcount));
    620620        else
     
    622622                    task->taskid, task->name, task->container, task, task->as);
    623623#endif
    624        
    625         if (*additional) {
    626                 for_each_cap(task, cap, CAP_TYPE_PHONE) {
    627                         phone_t *phone = (phone_t *) cap->kobject;
    628                         if (phone->callee)
    629                                 printf(" %d:%p", cap->handle, phone->callee);
    630                 }
    631                 printf("\n");
    632         }
    633624       
    634625        irq_spinlock_unlock(&task->lock, false);
Note: See TracChangeset for help on using the changeset viewer.