From df776b568f450f6a23d445cef97a6f407af57027 Mon Sep 17 00:00:00 2001 From: Bahadir Balban Date: Thu, 22 Oct 2009 22:50:50 +0300 Subject: [PATCH] Tests working up to neverending suspend - Will be fixed. --- include/l4/api/capability.h | 6 +++--- include/l4/macros.h | 1 + src/api/capability.c | 6 +++--- src/api/thread.c | 4 ++-- src/arch/arm/exception.c | 2 +- src/generic/container.c | 1 + 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/include/l4/api/capability.h b/include/l4/api/capability.h index add7651..883b1a4 100644 --- a/include/l4/api/capability.h +++ b/include/l4/api/capability.h @@ -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__ */ diff --git a/include/l4/macros.h b/include/l4/macros.h index e8ef5f5..b1c2016 100644 --- a/include/l4/macros.h +++ b/include/l4/macros.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) diff --git a/src/api/capability.c b/src/api/capability.c index 27f684c..cd0617d 100644 --- a/src/api/capability.c +++ b/src/api/capability.c @@ -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))); diff --git a/src/api/thread.c b/src/api/thread.c index c84956b..ff831e3 100644 --- a/src/api/thread.c +++ b/src/api/thread.c @@ -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 */ diff --git a/src/arch/arm/exception.c b/src/arch/arm/exception.c index 778e73c..281767c 100644 --- a/src/arch/arm/exception.c +++ b/src/arch/arm/exception.c @@ -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 diff --git a/src/generic/container.c b/src/generic/container.c index c8fa5b9..77b1d4a 100644 --- a/src/generic/container.c +++ b/src/generic/container.c @@ -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 {