Merge latest FreeRTOS/SMP upstream branch (#1449)
Update to head of upstream FreeRTOS/SMP branch. Very minor changes. Remove the custom getreent implementation, use the one that was defined in the upstream FreeRTOS/smp branch (callback related vs. static vars).
This commit is contained in:
parent
16c2e8e454
commit
a851a928d2
5 changed files with 18 additions and 5 deletions
|
|
@ -162,6 +162,7 @@ extern "C" void __register_impure_ptr(struct _reent *p) {
|
|||
}
|
||||
}
|
||||
|
||||
extern "C" struct _reent *__wrap___getreent() __attribute__((weak));
|
||||
extern "C" struct _reent *__wrap___getreent() {
|
||||
if (get_core_num() == 0) {
|
||||
return _impure_ptr;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ pcTaskGetName KEYWORD2
|
|||
ulTaskNotifyTake KEYWORD2
|
||||
vTaskNotifyGiveFromISR KEYWORD2
|
||||
taskYIELD KEYWORD2
|
||||
vTaskCoreAffinitySet KEYWORD2
|
||||
vTaskSuspend KEYWORD2
|
||||
vTaskResume KEYWORD2
|
||||
xTaskResumeFromISR KEYWORD2
|
||||
|
|
@ -43,6 +44,7 @@ xTaskGetTickCount KEYWORD2
|
|||
xTaskGetTickCountFromISR KEYWORD2
|
||||
uxTaskGetNumberOfTasks KEYWORD2
|
||||
uxTaskGetStackHighWaterMark KEYWORD2
|
||||
uxTaskGetSystemState KEYWORD2
|
||||
|
||||
# Instances (KEYWORD2)
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 4588fd64342d2e0f43bc6603e7220ee708dbd9ac
|
||||
Subproject commit 29fdcf092a8dd25605c7c15246b05ee153bbdaa6
|
||||
|
|
@ -29,10 +29,7 @@
|
|||
#define configUSE_TASK_PREEMPTION_DISABLE 1
|
||||
|
||||
#define configUSE_NEWLIB_REENTRANT 1
|
||||
#define configNEWLIB_REENTRANT_IS_DYNAMIC 0 /* Note that we have a different config option, portSET_IMPURE_PTR */
|
||||
#include <reent.h>
|
||||
extern void __register_impure_ptr(struct _reent *p);
|
||||
#define portSET_IMPURE_PTR(x) __register_impure_ptr(x)
|
||||
#define configNEWLIB_REENTRANT_IS_DYNAMIC 1
|
||||
|
||||
/* Run time stats related definitions. */
|
||||
void vMainConfigureTimerForRunTimeStats(void);
|
||||
|
|
|
|||
|
|
@ -1 +1,14 @@
|
|||
#include "../lib/FreeRTOS-Kernel/tasks.c"
|
||||
|
||||
//See https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/496
|
||||
struct _reent* __wrap___getreent(void) {
|
||||
// No lock needed because if this changes, we won't be running anymore.
|
||||
TCB_t *pxCurTask = xTaskGetCurrentTaskHandle();
|
||||
if (pxCurTask == NULL) {
|
||||
// No task running. Return global struct.
|
||||
return _GLOBAL_REENT;
|
||||
} else {
|
||||
// We have a task; return its reentrant struct.
|
||||
return &pxCurTask->xNewLib_reent;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue