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

@@ -256,17 +256,6 @@ int init_first_pager(struct pager *pager,
{
struct ktcb *task;
struct address_space *space;
struct capability *ktcb_cap;
/*
* Find capability from pager's list, since
* there is no ktcb, no standard path to check
* per-task capability list yet.
*/
ktcb_cap = capability_find_by_rtype(&pager->cap_list,
CAP_RTYPE_THREADPOOL);
/* Use it to allocate ktcb */
task = tcb_alloc_init_use_capability(ktcb_cap);
/*
* Initialize dummy current capability list pointer
@@ -274,6 +263,14 @@ int init_first_pager(struct pager *pager,
*/
current->cap_list_ptr = &pager->cap_list;
/*
* Find capability from pager's list, since
* there is no ktcb, no standard path to check
* per-task capability list yet.
*/
/* Use it to allocate ktcb */
task = tcb_alloc_init();
/* Initialize ktcb */
task_init_registers(task, pager->start_vma);
task_setup_utcb(task, pager);
@@ -331,18 +328,6 @@ int init_first_pager(struct pager *pager,
int init_pager(struct pager *pager, struct container *cont)
{
struct ktcb *task;
struct capability *ktcb_cap;
/*
* Find capability from pager's list, since
* there is no ktcb, no standard path to check
* per-task capability list yet.
*/
ktcb_cap = capability_find_by_rtype(&pager->cap_list,
CAP_RTYPE_THREADPOOL);
/* Use it to allocate ktcb */
task = tcb_alloc_init_use_capability(ktcb_cap);
/*
* Initialize dummy current capability list pointer
@@ -350,6 +335,9 @@ int init_pager(struct pager *pager, struct container *cont)
*/
current->cap_list_ptr = &pager->cap_list;
/* Use it to allocate ktcb */
task = tcb_alloc_init();
task_init_registers(task, pager->start_vma);
task_setup_utcb(task, pager);