mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
add portDONT_DISCARD to pxCurrentTCB (#479)
This fixes link failures with LTO: /tmp/ccJbaKaD.ltrans0.ltrans.o: in function `pxCurrentTCBConst2': /root/project/FreeRTOS/portable/GCC/ARM_CM4F/port.c:249: undefined reference to `pxCurrentTCB' /usr/lib/gcc/arm-none-eabi/11.2.0/../../../../arm-none-eabi/bin/ld: /tmp/ccJbaKaD.ltrans0.ltrans.o: in function `pxCurrentTCBConst': /root/project/FreeRTOS/portable/GCC/ARM_CM4F/port.c:443: undefined reference to `pxCurrentTCB'
This commit is contained in:
parent
c22f40d9a5
commit
bfe057367d
2
tasks.c
2
tasks.c
|
@ -337,7 +337,7 @@ typedef tskTCB TCB_t;
|
||||||
|
|
||||||
/*lint -save -e956 A manual analysis and inspection has been used to determine
|
/*lint -save -e956 A manual analysis and inspection has been used to determine
|
||||||
* which static variables must be declared volatile. */
|
* which static variables must be declared volatile. */
|
||||||
PRIVILEGED_DATA TCB_t * volatile pxCurrentTCB = NULL;
|
portDONT_DISCARD PRIVILEGED_DATA TCB_t * volatile pxCurrentTCB = NULL;
|
||||||
|
|
||||||
/* Lists for ready and blocked tasks. --------------------
|
/* Lists for ready and blocked tasks. --------------------
|
||||||
* xDelayedTaskList1 and xDelayedTaskList2 could be moved to function scope but
|
* xDelayedTaskList1 and xDelayedTaskList2 could be moved to function scope but
|
||||||
|
|
Loading…
Reference in a new issue