Changeset 05913fe7 in mainline for kernel/generic/include/cap/cap.h


Ignore:
Timestamp:
2017-10-09T22:18:09Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2bdf92a5
Parents:
e02bfb4
Message:

Allow virtually unlimited number of capabilities per task

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/cap/cap.h

    re02bfb4 r05913fe7  
    3838#include <typedefs.h>
    3939#include <adt/list.h>
     40#include <adt/hash.h>
     41#include <adt/hash_table.h>
     42#include <lib/ra.h>
    4043#include <synch/mutex.h>
    4144#include <atomic.h>
    42 
    43 #define MAX_CAPS  64
    4445
    4546typedef int cap_handle_t;
     
    8990        cap_state_t state;
    9091
     92        struct task *task;
    9193        cap_handle_t handle;
    9294
    9395        /* Link to the task's capabilities of the same kobject type. */
    94         link_t link;
     96        link_t type_link;
     97
     98        ht_link_t caps_link;
    9599
    96100        /* The underlying kernel object. */
     
    103107        list_t type_list[KOBJECT_TYPE_MAX];
    104108
    105         cap_t *caps;
     109        hash_table_t caps;
     110        ra_arena_t *handles;
    106111} cap_info_t;
    107112
     
    112117    bool (*)(cap_t *, void *), void *);
    113118
    114 extern void cap_initialize(cap_t *, cap_handle_t);
    115119extern cap_handle_t cap_alloc(struct task *);
    116120extern void cap_publish(struct task *, cap_handle_t, kobject_t *);
Note: See TracChangeset for help on using the changeset viewer.