First step in detaching pager struct from tasks

This commit is contained in:
Bahadir Balban
2009-11-03 14:50:22 +02:00
parent 00a9f2e3c9
commit 6c69f181db
7 changed files with 17 additions and 26 deletions

View File

@@ -28,7 +28,7 @@ int read_task_capabilities(void *userbuf)
* Currently only pagers can
* read their own capabilities
*/
if (current != current->pager->tcb)
if (current->tid != current->pagerid)
return -EPERM;
/* Determine size of pager capabilities (FIXME: partial!) */
@@ -126,7 +126,7 @@ int sys_capability_control(unsigned int req, unsigned int flags, void *userbuf)
switch(req) {
/* Return number of capabilities the thread has */
case CAP_CONTROL_NCAPS:
if (current != current->pager->tcb)
if (current->tid != current->pagerid)
return -EPERM;
if ((err = check_access((unsigned long)userbuf,

View File

@@ -132,7 +132,7 @@ int sys_exchange_registers(struct exregs_data *exregs, l4id_t tid)
* be the pagers making the call on themselves.
*/
if (task->state != TASK_INACTIVE && exregs->valid_vect &&
current != task && task->pager->tcb != current) {
current != task && task->pagerid != current->tid) {
err = -EACTIVE;
goto out;
}