mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 02:43:15 +01:00
Tests working up to neverending suspend - Will be fixed.
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
#define CAP_CONTROL_READ 1
|
||||
#define CAP_CONTROL_SHARE 2
|
||||
|
||||
#define CAP_SHARE_WITH_SPACE 1
|
||||
#define CAP_SHARE_WITH_CONTAINER 2
|
||||
#define CAP_SHARE_WITH_TGROUP 4
|
||||
#define CAP_SHARE_SPACE 1
|
||||
#define CAP_SHARE_CONTAINER 2
|
||||
#define CAP_SHARE_GROUP 4
|
||||
|
||||
#endif /* __API_CAPABILITY_H__ */
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
/* use this to place code/data in a certain section */
|
||||
#define SECTION(x) __attribute__((section(x)))
|
||||
#define ALIGN(x) __attribute__((aligned (x)))
|
||||
|
||||
/* Functions for critical path optimizations */
|
||||
#if (__GNUC__ >= 3)
|
||||
|
||||
@@ -56,15 +56,15 @@ int read_task_capabilities(void *userbuf)
|
||||
int capability_share(unsigned int share_flags)
|
||||
{
|
||||
switch (share_flags) {
|
||||
case CAP_SHARE_WITH_SPACE:
|
||||
case CAP_SHARE_SPACE:
|
||||
cap_list_move(¤t->space->cap_list,
|
||||
¤t->cap_list);
|
||||
break;
|
||||
case CAP_SHARE_WITH_CONTAINER:
|
||||
case CAP_SHARE_CONTAINER:
|
||||
cap_list_move(&curcont->cap_list,
|
||||
¤t->cap_list);
|
||||
break;
|
||||
case CAP_SHARE_WITH_TGROUP: {
|
||||
case CAP_SHARE_GROUP: {
|
||||
struct ktcb *tgr_leader;
|
||||
|
||||
BUG_ON(!(tgr_leader = tcb_find(current->tgid)));
|
||||
|
||||
@@ -349,8 +349,8 @@ int thread_create(struct task_ids *ids, unsigned int flags)
|
||||
flags &= THREAD_CREATE_MASK;
|
||||
|
||||
/* Can't have multiple space directives in flags */
|
||||
if ((flags & TC_SHARE_SPACE & TC_COPY_SPACE & TC_NEW_SPACE)
|
||||
|| !flags)
|
||||
if ((flags & TC_SHARE_SPACE
|
||||
& TC_COPY_SPACE & TC_NEW_SPACE) || !flags)
|
||||
return -EINVAL;
|
||||
|
||||
/* Can't request shared utcb or tgid without shared space */
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include INC_SUBARCH(mm.h)
|
||||
|
||||
/* Abort debugging conditions */
|
||||
//#define DEBUG_ABORTS
|
||||
// #define DEBUG_ABORTS
|
||||
#if defined (DEBUG_ABORTS)
|
||||
#define dbg_abort(...) dprintk(__VA_ARGS__)
|
||||
#else
|
||||
|
||||
@@ -97,6 +97,7 @@ int init_pager(struct pager *pager,
|
||||
/* Initialize space structure */
|
||||
link_init(&space->list);
|
||||
mutex_init(&space->lock);
|
||||
cap_list_init(&space->cap_list);
|
||||
space->pgd = current_pgd;
|
||||
address_space_attach(task, space);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user