mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 02:43:15 +01:00
First step in detaching pager struct from tasks
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user