Commit Graph

64 Commits (b87dfa3e978e24b26e6c56cbf9b14c9ed39bc956)

Author SHA1 Message Date
Sudeep Mohanty 2eff037080
Update prvYieldCore() compile warning for single core targets (#505)
When configNUM_CORES is 1, prvYieldCore() generates an array subscript
outofbound error (-Warray-bounds) when compiled with GCC with space
optimization enabled (-Os).

This commit updates the code flow in prvYieldCore() to compile out
the part where yield is needed on the other core which is unnecessary
for single-core targets.
3 years ago
Darian 34b8e24d7c
Add support for newlib dynamic reentrancy (#496)
Previously, newlib's _impure_ptr was updated on every context switch
to point to the current task's _reent structure.

However, this behavior is no longer valid on multi-core systems due
to the fact that multiple cores can switch contexts at the same time,
thus leading to the corruption of the _impure_ptr.

However, Newlib can be compiled with __DYNAMIC_REENT__ enabled which
will cause newlib functions to call __getreent() instead in order to
obtain the required reent struct.

This commit adds dynamic reentrancy support to FreeRTOS:

- Added a configNEWLIB_REENTRANT_IS_DYNAMIC to enable dynamic reentrancy support
- _impure_ptr is no longer updated with reentrancy is dynamic
- Port must provide their own __getreent() that returns the current task's reent struct
3 years ago
Darian a97741a08d
Add task creation with affinity functions (#470)
This commit adds the functions listed below. These functions allow
tasks to be created with their core affinity already set.

- xTaskCreateAffinitySet()
- xTaskCreateStaticAffinitySet()
- xTaskCreateRestrictedAffinitySet()
- xTaskCreateRestrictedStaticAffinitySet()
3 years ago
Darian 4446c8f0ea
Fix pxPreviousTCB compile warning (#464)
When compiling with configNUM_CORES == 1 and configUSE_CORE_AFFINITY == 1,
pxPreviousTCB will generate a "set but unused" warning.
3 years ago
Gaurav-Aggarwal-AWS 2b0fdf2a71
Add SMP in the License Header (#402)
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
3 years ago
Gaurav-Aggarwal-AWS 970b678a0b
SMP version (#401)
* Update version number for SMP

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
3 years ago
Gaurav-Aggarwal-AWS 7ce8266bc5
Update SMP docs (#400)
This commit adds the docs for newly added SMP APIs.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
3 years ago
N3xed a2c8db1089
Move uxCoreAffinityMask after xMPUSettings (#372)
Allows for much easier assembly access to the field.
4 years ago
Joseph Julicher b515641e0a
adding a minimal idle hook to the SMP port (#329)
* adjusting the kernel checks repo

* Added a minimal idle hook for all idle tasks
4 years ago
Joseph Julicher 0c1381311b
Merge branch 'smp' into smp 4 years ago
Joseph Julicher d58750f5f9 Updated from upstream 4 years ago
Joseph Julicher e71e702110 Static allocation and lightweight idle tasks (#323)
* added multiple idle tasks

* Added multiple IDLE tasks to non-static allocation

* Adjustments to tasks from PR review
4 years ago
Joseph Julicher bc42e04850 Uncrustified tasks.c 4 years ago
Joseph Julicher 74f816ab40 Adjustments to tasks from PR review 4 years ago
Joseph Julicher a65f379860 added multiple idle tasks 4 years ago
Joseph Julicher f916ccf506 Static allocation and lightweight idle tasks (#323)
* added multiple idle tasks

* Added multiple IDLE tasks to non-static allocation

* Adjustments to tasks from PR review
4 years ago
Joseph Julicher 61fa224694 missed taskYield in minimalIDLE task 4 years ago
Joseph Julicher 106e15ea6b Uncrustified tasks.c 4 years ago
Joseph Julicher 87279a3dc7 Fixed static allocation internal array 4 years ago
Joseph Julicher 6369b03bd1 fixed additional bit mask test errors 4 years ago
Joseph Julicher 56d94df0a8 Fixed bit mask compare bug 4 years ago
Joseph Julicher d59bfca4f9 converted exclusion to affinity 4 years ago
Joseph Julicher ec943bcc1a
Static allocation and lightweight idle tasks (#323)
* added multiple idle tasks

* Added multiple IDLE tasks to non-static allocation

* Adjustments to tasks from PR review
4 years ago
Joseph Julicher b9a17479a0 Adjustments to tasks from PR review 4 years ago
Joseph Julicher ad317efd62 Added multiple IDLE tasks to non-static allocation 4 years ago
Joseph Julicher 80457ca165 added multiple idle tasks 4 years ago
Joseph Julicher ddf9007606 Added a rough pico support. Remove rtos_prints from task.c 4 years ago
Joseph Julicher 989bc332b2
Feature: SMP (#278)
* Add XMOS XCore ports

Some minor modifications are also made to the kernel to support the
XCore compiler's automatic stack size calculation.

* Update kernel to support SMP

The XMOS XCore ports are also updated to support SMP.

* Fix compiler warnings in xcore ports

The port set and clear interrupt mask from ISR macros were removed from
the ports so that the default macros found in FreeRTOS.h are used
instead. The default macros do not result in warnings when they are
used.

* Remove inline function from timers.h

Inline function converted to macro. This should now build when
optimizations are off and inlining is disabled.

* Fix compiler warnings in xcore ports and tasks.c

* fixed documentation for ulTaskNotifyTake() and ulTaskNotifyTakeIndexed()

* spelling fixes for tasks.c

Co-authored-by: Michael Bruno <mikeb@xmos.com>
4 years ago
alfred gedeon 4b5d1e4395
Comment: fix code comment for xTaskAbortDelay (#272) 4 years ago
gomonovych 4fde4a8d0a
Add description for vTaskList (#206)
Describe each column which vTaskList print:
task name, task status, task priority, task stack unused watermark lewel, task number

Co-authored-by: David Chalco <59750547+dachalco@users.noreply.github.com>
4 years ago
Gaurav-Aggarwal-AWS 2a604f4a28
Support allocating stack from separate heap (#267)
The change adds support for allocating task stacks from separate heap.
When configSTACK_ALLOCATION_FROM_SEPARATE_HEAP is defined as 1 in
FreeRTOSConfig.h, task stacks are allocated and freed using
pvPortMallocStack and vPortFreeStack functions. This allows the
application writer to provide a separate allocator for task stacks.

When configSTACK_ALLOCATION_FROM_SEPARATE_HEAP is defined as 0, task
stacks are allocated and freed using FreeRTOS heap functions
pvPortMalloc and vPortFree.

For backward compatibility, configSTACK_ALLOCATION_FROM_SEPARATE_HEAP
defaults to 0.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years ago
nazar01 6b4a3d0a6e
Typos (#248)
* Fix typos in FreeRTOS.h

* Fix typos in task.h

* Fix typos in tasks.c
4 years ago
Cobus van Eeden ec62f69dab [AUTO][RELEASE]: Bump file header version to "10.4.3" 4 years ago
David Chalco 337bca615e [AUTO][RELEASE]: Bump file header version to "10.4.2" 4 years ago
Gaurav-Aggarwal-AWS db62e30bce
Fix missed yield in xTaskResumeFromISR (#207)
If a higher priority task than the currently running task was resumed
using xTaskResumeFromISR and the user chose to ignore the return value
of xTaskResumeFromISR to initiate a context switch using
portYIELD_FROM_ISR, we were not doing the context switch on the next run
of the scheduler. This change fixes this by marking a yield as pending
to ensure that the context switch is performed on the next run of the
scheduler.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years ago
RichardBarry 5fb26de019
Recently vTaskDelayUntil() was updated to xTaskDelayUntil() because the function now returns a value. The PR didn't make the same change in the MPU port, or update the constants required to include the xTaskDelayUntil() function in the build. (#199)
This PR:
Changes the INCLUDE_vTaskDelayUntil compile time constant to INCLUDE_xTaskDelayUntil.
Updates FreeRTOS.h to ensure backward compatibility for projects that already have INCLUDE_vTaskDelayUntil defined.
Updates the MPU prototypes, wrapper and implementation to use the updated xTaskDelayUntil() function.

Tests to be checked into the FreeRTOS/FreeRTOS repository after this PR.
4 years ago
Spacefish 3260e228c3
vTaskDelayUntil improvement (#77)
* vTaskDelayUntil improvement

* suggestions implemented

* xTaskDelayUntil #define added

* doc small fix

* small formatting stuff

* more small formatting stuff

* Update lexicon.txt

Co-authored-by: Carl Lundin <53273776+lundinc2@users.noreply.github.com>
Co-authored-by: Carl Lundin <lundinc@amazon.com>
4 years ago
David Chalco b1307dbea8
OpenOCD Support: Re-introduce uxTopUsedPriority (#188)
* re-introduce uxTopUsedPriority. Prevent removal by optimization

* Make uxTopUsedPriority volatile to avoid optimizer + code comment

Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
4 years ago
alfred gedeon d428209d01
Fix some broken/redirected URL (#172)
* Style: fix some broken/redirect links

* Fix: atmel url

* Fix microchip typo

* Fix url links

* Fix shortcut link

* Comment: fix line wrapping

* Style: fix line wrapping to 80 chars

* Add now microchip beside Atmel

* Fix link in History

* Add Now Microchip before Atmel link

* Comment: add *
4 years ago
David Chalco 3604527e3b
Update version number to 10.4.1 (#173) 5 years ago
David Chalco 5dfab0306b
Update version number to 10.4.0 (#153) 5 years ago
RichardBarry 700c1cf9c6
Fix compiler warning in config assert() on 64 bit architecture (#158)
* Replace the following code that was used to force an assert:
configASSERT( pxTCB->ulNotifiedValue[ uxIndexToNotify ] == ~0UL );

with:
configASSERT( xTickCount == ( TickType_t ) 0 );

Because the former generates a warning on 64-bit architectures.
5 years ago
alfred gedeon a038146915
Style: Make freertos.org = FreeRTOS.org and add https (#134)
* Style: make freertos.org = FreeRTOS.org also add https

* Style: Fix freertos into FreeRTOS

* Style: Fix freertos into FreeRTOS

Co-authored-by: Alfred Gedeon <gedeonag@amazon.com>
5 years ago
alfred gedeon 0b0a2060c0
Style: Change FreeRTOS websites in comments (#131)
* Style: Change FreeRTOS websites in comments

* Style: Change freertos to FreeRTOS in comments

* Style: Remove broken link

Co-authored-by: Alfred Gedeon <gedeonag@amazon.com>
5 years ago
Joseph Julicher 1865857eae
Moving the function prototypes to headers (#128)
* Removing StackMacros.h

* Moving 4 Function Prototypes out of the C files into the headers

* Revert "Removing StackMacros.h"

This reverts commit cdd8307817.
5 years ago
alfred gedeon 9a1ebfec31
Style: Uncrustify kernel file - remove tab == 4 spaces (#123)
* Style: uncrystify kernel files and remove tabs

* Style: uncrystify kernel files and remove tabs

Co-authored-by: Alfred Gedeon <gedeonag@amazon.com>
5 years ago
alfred gedeon 8c77117c32
Style: Remove tabs and tab == 4 spaces (#120)
* Style: Remove tabls and tab == 4 spaces

* Style: remove xx accidentally left

* Style: revert uncrustify for untested portable directories

* Style: revert more uncrustify files

* Style: Revert more uncrustified files

* Style: Revert some uncrutified files

* Style: change more files

* Style: remove t tab == 4 spaces

* Style: remove tabs = spaces

* Style: revert changed files

* Style: redo the stuyles

* Style: add uncrustify disable parsing for asm

Co-authored-by: Alfred Gedeon <gedeonag@amazon.com>
5 years ago
RichardBarry 55da9591c0
Fix: Two one line fixes, xTaskCheckForTimeOut() and ulTaskGenericNotifyValueClear(). (#82)
ulTaskGenericNotifyValueClear() returned the notification value of the
currently running task, not the target task.  Now it returns the
notification value of the target task.

Some users expected xTaskCheckForTimeOut() to clear the 'last wake time'
value each time a timeout occurred, whereas it only did that in one path.
It now clears the last wake time in all paths that return that a timeout
occurred.
5 years ago
Gaurav-Aggarwal-AWS bb1c429378
Place privileged symbols correctly (#84)
Some of the privileged symbols were not being placed in their respective
sections. This commit addresses those and places them in
privileged_functions or privileged_data section.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
5 years ago
Alfred Gedeon 587a83d647 Style: uncrustify kernel files 5 years ago