mirror of https://github.com/thesofproject/sof.git
arch: xtensa: verify xtos_active_task offset
Adds STATIC_ASSERT to verify if the XTOS_TASK_CONTEXT_OFFSET is set to the right value. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit is contained in:
parent
db2a6e5b58
commit
84e75633d0
|
@ -10,6 +10,7 @@
|
|||
* \authors Liam Girdwood <liam.r.girdwood@linux.intel.com>
|
||||
*/
|
||||
|
||||
#include "xtos-internal.h"
|
||||
#include <sof/common.h>
|
||||
#include <sof/init.h>
|
||||
#include <sof/lib/cpu.h>
|
||||
|
@ -17,11 +18,16 @@
|
|||
#include <config.h>
|
||||
#include <xtensa/xtruntime-frames.h>
|
||||
#include <xtos-structs.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/* UserFrame's size needs to be 16 bytes aligned */
|
||||
STATIC_ASSERT((sizeof(UserFrame) % 16) == 0, invalid_UserFrame_alignment);
|
||||
|
||||
/* verify xtos_active_task offset */
|
||||
STATIC_ASSERT(offsetof(struct thread_data, xtos_active_task) ==
|
||||
XTOS_TASK_CONTEXT_OFFSET, invalid_xtos_active_task_offset);
|
||||
|
||||
#if CONFIG_DEBUG_LOCKS
|
||||
/** \brief Debug lock. */
|
||||
uint32_t lock_dbg_atomic;
|
||||
|
|
|
@ -114,6 +114,7 @@
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#define XTOS_TASK_CONTEXT_OFFSET 40
|
||||
|
||||
#if defined(_ASMLANGUAGE) || defined(__ASSEMBLER__)
|
||||
/*********** Useful macros ***********/
|
||||
|
@ -315,8 +316,6 @@ XTOS_PENDING_OFS: .space 4 /* _xtos_pending variable */
|
|||
# define IFNSA(a,b) b
|
||||
# endif
|
||||
|
||||
#define XTOS_TASK_CONTEXT_OFFSET 40
|
||||
|
||||
// get_prid ax
|
||||
// Extracts core id.
|
||||
.macro get_prid ax
|
||||
|
|
Loading…
Reference in New Issue