Capabilities for quantitative resources working.

Status:
- Capability initialization is a bit hacky with dummy current etc.
- All container caps belong to the pager
- Tasks refer to their pager's capabilities for mutex allocation - Hacky.
- Kernel container keeps quantitative caps and memory caps in separate lists - Hacky.

These will all evolve and get fixed.
This commit is contained in:
Bahadir Balban
2009-08-22 23:41:53 +03:00
parent d3d072e47d
commit 117e3482b6
7 changed files with 66 additions and 66 deletions

View File

@@ -41,8 +41,9 @@ int capability_consume(struct capability *cap, int quantity)
{
if (cap->size < cap->used + quantity)
return -ENOCAP;
else
cap->used += quantity;
cap->used += quantity;
return 0;
}