mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 02:43:15 +01:00
Added sharing of pager capabilities with children or siblings
Pagers can now share their own private capabilities with their paged children, or their siblings with whom they have a common pager ancestor. Added flags CAP_SHARE_CHILD and CAP_SHARE_SIBLINGS for that.
This commit is contained in:
@@ -7,13 +7,15 @@
|
||||
#define __API_CAPABILITY_H__
|
||||
|
||||
/* Capability syscall request types */
|
||||
#define CAP_CONTROL_NCAPS 0
|
||||
#define CAP_CONTROL_READ 1
|
||||
#define CAP_CONTROL_SHARE 2
|
||||
#define CAP_CONTROL_NCAPS 0x00
|
||||
#define CAP_CONTROL_READ 0x01
|
||||
#define CAP_CONTROL_SHARE 0x02
|
||||
|
||||
#define CAP_SHARE_SPACE 1
|
||||
#define CAP_SHARE_CONTAINER 2
|
||||
#define CAP_SHARE_GROUP 4
|
||||
#define CAP_SHARE_PAGED 8 /* All that we are pager of */
|
||||
#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 */
|
||||
|
||||
#endif /* __API_CAPABILITY_H__ */
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#define THREAD_DESTROY 0x0004
|
||||
#define THREAD_RECYCLE 0x0005
|
||||
|
||||
#define THREAD_CREATE_MASK 0x07F0
|
||||
#define THREAD_CREATE_MASK 0x0FF0
|
||||
#define TC_SHARE_CAPS 0x0010 /* Share all thread capabilities */
|
||||
#define TC_SHARE_UTCB 0x0020 /* Share utcb location (same space */
|
||||
#define TC_SHARE_GROUP 0x0040 /* Share thread group id */
|
||||
|
||||
@@ -102,9 +102,9 @@ struct ktcb {
|
||||
struct pager *pager;
|
||||
|
||||
/* Capability lists */
|
||||
struct cap_list cap_list;
|
||||
struct cap_list tgr_cap_list;
|
||||
struct cap_list pager_cap_list;
|
||||
struct cap_list cap_list; /* Own private capabilities */
|
||||
struct cap_list tgroup_cap_list; /* Caps shared with thread group */
|
||||
struct cap_list pager_cap_list; /* Caps shared with paged children */
|
||||
|
||||
/* Fields for ipc rendezvous */
|
||||
struct waitqueue_head wqh_recv;
|
||||
|
||||
Reference in New Issue
Block a user