mirror of
https://github.com/drasko/codezero.git
synced 2026-01-21 15:23:15 +01:00
Progress on capabilities
Capabilities will be shared among collection of threads. A pager will have a right to share its own capabilities with its space, its thread group and its container. Currently sharing is possible with only all of the caps. Next, it will be support for cap splitting, granting, and partial sharing and granting.
This commit is contained in:
@@ -73,6 +73,18 @@ static inline void list_remove_init(struct link *link)
|
||||
link->prev = link;
|
||||
}
|
||||
|
||||
/* Cuts the whole list from head and returns it */
|
||||
static inline struct link *list_detach(struct link *head)
|
||||
{
|
||||
struct link *next = head->next;
|
||||
|
||||
/* Detach head from rest of the list */
|
||||
list_remove_init(head);
|
||||
|
||||
/* Return detached list */
|
||||
return next;
|
||||
}
|
||||
|
||||
static inline int list_empty(struct link *list)
|
||||
{
|
||||
return list->prev == list && list->next == list;
|
||||
|
||||
Reference in New Issue
Block a user