mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Define xcoreid offset, add warning in tcb struct wrt the need to also change that define when struct changes
This commit is contained in:
parent
b3309a03a3
commit
4daa768e3c
@ -157,7 +157,7 @@ typedef struct tskTaskControlBlock
|
|||||||
StackType_t *pxStack; /*< Points to the start of the stack. */
|
StackType_t *pxStack; /*< Points to the start of the stack. */
|
||||||
char pcTaskName[ configMAX_TASK_NAME_LEN ];/*< Descriptive name given to the task when created. Facilitates debugging only. */ /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
char pcTaskName[ configMAX_TASK_NAME_LEN ];/*< Descriptive name given to the task when created. Facilitates debugging only. */ /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||||
BaseType_t xCoreID; /*< Core this task is pinned to */
|
BaseType_t xCoreID; /*< Core this task is pinned to */
|
||||||
|
/* If this moves around (other than pcTaskName size changes), please change the define in xtensa_vectors.S as well. */
|
||||||
#if ( portSTACK_GROWTH > 0 )
|
#if ( portSTACK_GROWTH > 0 )
|
||||||
StackType_t *pxEndOfStack; /*< Points to the end of the stack on architectures where the stack grows up from low memory. */
|
StackType_t *pxEndOfStack; /*< Points to the end of the stack on architectures where the stack grows up from low memory. */
|
||||||
#endif
|
#endif
|
||||||
|
@ -92,6 +92,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
#include "xtensa_rtos.h"
|
#include "xtensa_rtos.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
Define for workaround: pin no-cpu-affinity tasks to a cpu when fpu is used.
|
||||||
|
Please change this when the tcb structure is changed
|
||||||
|
*/
|
||||||
|
#define TASKTCB_XCOREID_OFFSET (0x3C+configMAX_TASK_NAME_LEN+3)&~3
|
||||||
.extern pxCurrentTCB
|
.extern pxCurrentTCB
|
||||||
|
|
||||||
/* Enable stack backtrace across exception/interrupt - see below */
|
/* Enable stack backtrace across exception/interrupt - see below */
|
||||||
@ -902,7 +907,7 @@ _xt_coproc_exc:
|
|||||||
slli a3, a3, 2
|
slli a3, a3, 2
|
||||||
add a2, a2, a3
|
add a2, a2, a3
|
||||||
l32i a2, a2, 0 /* a2 = start of pxCurrentTCB[cpuid] */
|
l32i a2, a2, 0 /* a2 = start of pxCurrentTCB[cpuid] */
|
||||||
addi a2, a2, (0x3C+configMAX_TASK_NAME_LEN+3)&~3 /* offset to xCoreID in tcb struct */
|
addi a2, a2, TASKTCB_XCOREID_OFFSET /* offset to xCoreID in tcb struct */
|
||||||
getcoreid a3
|
getcoreid a3
|
||||||
s32i a3, a2, 0 /* store current cpuid */
|
s32i a3, a2, 0 /* store current cpuid */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user