arm: mpu: Adjust to use opaque kernel data types

This patch adjusts the ARM MPU implementation to be compliant to the
recent changes that introduced the opaque kernel data types.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
This commit is contained in:
Andy Gross 2017-08-02 15:14:49 -05:00 committed by Kumar Gala
commit 5930e9d02d
2 changed files with 8 additions and 6 deletions

View file

@ -64,8 +64,7 @@ void _new_thread(struct k_thread *thread, k_thread_stack_t stack,
char *stackEnd = pStackMem + stackSize; char *stackEnd = pStackMem + stackSize;
struct __esf *pInitCtx; struct __esf *pInitCtx;
_new_thread_init(thread, K_THREAD_STACK_BUFFER(pStackMem), stackSize, _new_thread_init(thread, pStackMem, stackSize, priority, options);
priority, options);
/* carve the thread entry struct from the "base" of the stack */ /* carve the thread entry struct from the "base" of the stack */

View file

@ -69,7 +69,8 @@ extern "C" {
* @param size Size of the stack memory region * @param size Size of the stack memory region
*/ */
#define _ARCH_THREAD_STACK_DEFINE(sym, size) \ #define _ARCH_THREAD_STACK_DEFINE(sym, size) \
char __noinit __aligned(STACK_ALIGN) sym[size+STACK_ALIGN] struct _k_thread_stack_element __noinit __aligned(STACK_ALIGN) \
sym[size+STACK_ALIGN]
/** /**
* @brief Declare a toplevel array of thread stack memory regions * @brief Declare a toplevel array of thread stack memory regions
@ -85,7 +86,8 @@ extern "C" {
* @param size Size of the stack memory region * @param size Size of the stack memory region
*/ */
#define _ARCH_THREAD_STACK_ARRAY_DEFINE(sym, nmemb, size) \ #define _ARCH_THREAD_STACK_ARRAY_DEFINE(sym, nmemb, size) \
char __noinit __aligned(STACK_ALIGN) sym[nmemb][size+STACK_ALIGN] struct _k_thread_stack_element __noinit __aligned(STACK_ALIGN) \
sym[nmemb][size+STACK_ALIGN]
/** /**
* @brief Declare an embedded stack memory region * @brief Declare an embedded stack memory region
@ -100,7 +102,8 @@ extern "C" {
* @param size Size of the stack memory region * @param size Size of the stack memory region
*/ */
#define _ARCH_THREAD_STACK_MEMBER(sym, size) \ #define _ARCH_THREAD_STACK_MEMBER(sym, size) \
char __aligned(STACK_ALIGN) sym[size+STACK_ALIGN] struct _k_thread_stack_element __aligned(STACK_ALIGN) \
sym[size+STACK_ALIGN]
/** /**
* @brief Return the size in bytes of a stack memory region * @brief Return the size in bytes of a stack memory region
@ -128,7 +131,7 @@ extern "C" {
* @param sym Declared stack symbol name * @param sym Declared stack symbol name
* @return The buffer itself, a char * * @return The buffer itself, a char *
*/ */
#define _ARCH_THREAD_STACK_BUFFER(sym) (sym + STACK_ALIGN) #define _ARCH_THREAD_STACK_BUFFER(sym) ((char *)(sym + STACK_ALIGN))
#ifdef __cplusplus #ifdef __cplusplus
} }