mirror of
https://github.com/drasko/codezero.git
synced 2026-01-28 10:43:14 +01:00
Capability accounting for quantitative capabilities - First part done.
Need to make sure accounting charges correct containers during init. Therefore kernel resource spending must also be accounted for.
This commit is contained in:
@@ -71,6 +71,7 @@ struct cap_list {
|
||||
|
||||
void capability_init(struct capability *cap);
|
||||
struct capability *capability_create(void);
|
||||
struct capability *boot_capability_create(void);
|
||||
|
||||
|
||||
static inline void cap_list_init(struct cap_list *clist)
|
||||
@@ -86,6 +87,12 @@ static inline void cap_list_insert(struct capability *cap,
|
||||
clist->ncaps++;
|
||||
}
|
||||
|
||||
/* Capability checking for quantitative capabilities */
|
||||
int capability_consume(struct capability *cap, int quantity);
|
||||
int capability_free(struct capability *cap, int quantity);
|
||||
struct capability *capability_find_by_rtype(struct cap_list *clist,
|
||||
unsigned int rtype);
|
||||
|
||||
#if 0
|
||||
/* Virtual memory space allocated to container */
|
||||
struct capability cap_virtmap = {
|
||||
|
||||
Reference in New Issue
Block a user