mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 10:53:16 +01:00
We moved initial list of a pager's caps from ktcb to task's space since the task is expected to trust its space. Most references to task->cap_list had to change. Although a single cap list only tells part of the story about the task's caps, the TASK_CAP_LIST macro works for us to get the first private set of caps that a task has.
28 lines
737 B
C
28 lines
737 B
C
/*
|
|
* Syscall API for capability manipulation
|
|
*
|
|
* Copyright (C) 2009 Bahadir Balban
|
|
*/
|
|
#ifndef __API_CAPABILITY_H__
|
|
#define __API_CAPABILITY_H__
|
|
|
|
/* Capability syscall request types */
|
|
#define CAP_CONTROL_NCAPS 0x00
|
|
#define CAP_CONTROL_READ 0x01
|
|
#define CAP_CONTROL_SHARE 0x02
|
|
#define CAP_CONTROL_GRANT 0x03
|
|
#define CAP_CONTROL_MODIFY 0x05
|
|
|
|
#define CAP_SHARE_MASK 0x1F
|
|
#define CAP_SHARE_SPACE 0x01
|
|
#define CAP_SHARE_CONTAINER 0x02
|
|
#define CAP_SHARE_GROUP 0x04
|
|
#define CAP_SHARE_CHILD 0x08 /* All that we are pager of */
|
|
#define CAP_SHARE_SIBLING 0x10 /* All that have a common pager */
|
|
|
|
/* Task's primary capability list */
|
|
#define TASK_CAP_LIST(task) \
|
|
(&((task)->space->cap_list))
|
|
|
|
#endif /* __API_CAPABILITY_H__ */
|