arch: Move STACK_ALIGNMENT definition to up_internal.h

to avoid the same macro duplicate to many place

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2022-02-16 00:59:06 +08:00
committed by archer
parent f42b56b1c4
commit 3bf416e8b8
59 changed files with 236 additions and 743 deletions
-5
View File
@@ -47,11 +47,6 @@
# define HAVE_KERNEL_HEAP 1
#endif
/* Stack alignment macros */
#define STACK_ALIGN_MASK (sizeof(uint32_t) - 1)
#define STACK_ALIGN_DOWN(a) ((a) & ~STACK_ALIGN_MASK)
/****************************************************************************
* Public Functions
****************************************************************************/
+6
View File
@@ -71,6 +71,12 @@
# define USE_SERIALDRIVER 1
#endif
/* Stack alignment macros */
#define STACK_ALIGN_MASK (sizeof(uint32_t) - 1)
#define STACK_ALIGN_DOWN(a) ((a) & ~STACK_ALIGN_MASK)
#define STACK_ALIGN_UP(a) (((a) + STACK_ALIGN_MASK) & ~STACK_ALIGN_MASK)
/* Linker defined section addresses */
#define _START_TEXT ((const void *)&_stext)
+1 -16
View File
@@ -27,22 +27,7 @@
#include <nuttx/arch.h>
#include <nuttx/sched.h>
/****************************************************************************
* Pre-processor Macros
****************************************************************************/
/* Stack alignment macros */
#define STACK_ALIGN_MASK (sizeof(uint32_t) - 1)
#define STACK_ALIGN_UP(a) (((a) + STACK_ALIGN_MASK) & ~STACK_ALIGN_MASK)
/****************************************************************************
* Private Types
****************************************************************************/
/****************************************************************************
* Private Function Prototypes
****************************************************************************/
#include "up_internal.h"
/****************************************************************************
* Public Functions
-9
View File
@@ -32,15 +32,6 @@
#include "up_internal.h"
/****************************************************************************
* Pre-processor Macros
****************************************************************************/
/* Stack alignment macros */
#define STACK_ALIGN_MASK (sizeof(uint32_t) - 1)
#define STACK_ALIGN_DOWN(a) ((a) & ~STACK_ALIGN_MASK)
/****************************************************************************
* Public Functions
****************************************************************************/