mirror of
https://github.com/drasko/codezero.git
synced 2026-01-15 04:13:16 +01:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user