Commit Graph

24 Commits

Author SHA1 Message Date
David Chalco
5dfab0306b
Update version number to 10.4.0 (#153) 2020-09-10 19:49:34 -07:00
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.
2020-09-06 22:08:00 -07:00
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>
2020-08-21 11:30:39 -07:00
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>
2020-08-20 14:59:28 -07:00
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 cdd8307817048c794d038588aa00833b0532401b.
2020-08-18 11:29:00 -07:00
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>
2020-08-17 16:16:11 -07:00
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>
2020-08-17 14:50:56 -07:00
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.
2020-08-09 16:18:57 -07:00
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>
2020-07-14 16:22:42 -07:00
Alfred Gedeon
587a83d647 Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
Alfred Gedeon
2c530ba5c3 Style: uncrustify 2020-07-08 10:24:06 -07:00
Alfred Gedeon
718178c68a Style: uncrusitfy 2020-07-08 10:24:06 -07:00
Alfred Gedeon
a5dbc2b1de Style: uncrustify kernel files 2020-07-08 10:24:06 -07:00
eriktamlin
359b10a4ea
Added index to all trace points. (#69) 2020-06-17 16:38:06 -07:00
RichardBarry
f2081af030
Feature/multiple direct to task notifications (#63)
Description
Before this change each task had a single direct to task notification value and state as described here: https://www.FreeRTOS.org/RTOS-task-notifications.html. After this change each task has an array of task notifications, so more than one task notification value and state per task. The new FreeRTOSConfig.h compile time constant configTASK_NOTIFICATION_ARRAY_ENTRIES sets the number of indexes in the array.

Each notification within the array operates independently - a task can only block on one notification within the array at a time and will not be unblocked by a notification sent to any other array index.

Task notifications were introduced as a light weight method for peripheral drivers to pass data and events to tasks without the need for an intermediary object such as a semaphore - for example, to unblock a task from an ISR when the operation of a peripheral completed. That use case only requires a single notification value. Their popularity and resultant expanded use cases have since made the single value a limitation - especially as FreeRTOS stream and message buffers themselves use the notification mechanism. This change resolves that limitation. Stream and message buffers still use the task notification at array index 0, but now application writers can avoid any conflict that might have with their own use of task notifications by using notifications at array indexes other than 0.

The pre-existing task notification API functions work in a backward compatible way by always using the task notification at array index 0. For each such function there is now an equivalent that is postfixed "Indexed" and takes an additional parameter to specify which index within the array it should operate upon. For example, xTaskNotify() is the original that only operates on array index 0. xTaskNotifyIndexed() is the new function that can operate on any array index.

Test Steps
The update is tested using the Win32 demo (PR to be created in the FreeRTOS/FreeRTOS github repo), which has been updated to build and run a new test file FreeRTOS/Demo/Common/Minimal/TaskNotifyArray.c. The tests in that file are in addition to, not a replacement for those in FreeRTOS/Demo/Common/Minimal/TaskNotify.c.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
2020-05-27 12:28:48 -07:00
Daniel Glaser
e4e4fb01a1
Adding volatile to tasks.c's runtime information to protect against compiler optimization (#62)
As discussed in https://forums.freertos.org/t/make-runtime-stats-working-with-compiler-optimization-enabled/9846 and on lined out on https://blog.the78mole.de/freertos-debugging-on-stm32-cpu-usage/, adding the volatile prevents the run-time stats variable being optimized away when used with compiler optimizations.
2020-05-22 10:26:41 -07:00
Yuhui Zheng
a5531aade6 pxTCB is no longer needed in this local function. 2020-03-24 11:51:17 -07:00
WineQ圈9
3b8c72c669
Update tasks.c (#22)
An optimization for prvResetNextTaskUnblockTime().
2020-03-22 19:18:48 -07:00
WineQ圈9
eff07c040a
Update tasks.c (#26)
Reopen this PR.
2020-03-19 09:00:05 -07:00
RichardBarry
5d28744feb Improve documentation for the ulTaskNotifyValueClear() and xTaskCatchUpTicks() API functions.
Move the prototype and documentation for xTaskCatchUpTicks() into the correct place in the task.h header file (in the public documentation from the private documentation).
Rename the variable that holds the return value in xTaskCatchUpTicks() to more accurately represent its meaning.
2020-03-15 20:24:18 -07:00
WineQ圈9
180d0b8ee3
Update tasks.c (#24)
An error on trace argument.
In "xTaskPriorityDisinherit", the disinherit priority should be "pxTCB->uxBasePriority".
And, in "vTaskPriorityDisinheritAfterTimeout", the disinherit priority should be "uxPriorityToUse", which might not be "pxTCB->uxBasePriority".
2020-03-14 11:58:19 -07:00
RichardBarry
e1b98f0b4b This change prevents tickless idle mode potentially sleeping for an extra tick in the corer case that a tick interrupt occurred between the scheduler being suspended and the expected idle time being checked for a second time (within the idle task) - as described by the sequence below. Th change updates eTaskConfirmSleepModeStatus() to specifically check if a tick is pending, and if so, abort entering sleep mode.
+ The idle task decides to enter sleep mode on the following line.
```
if( xExpectedIdleTime >= configEXPECTED_IDLE_TIME_BEFORE_SLEEP )
```

+ The scheduler is suspended, preventing any context switches.

[Potentially a tick interrupt could occur here.  That could happen if other tasks executing consumed a lot of time since the above code line executed.  If a tick interrupt occurs here the interrupt will be entered but the interrupt will not do anything other than increment xPendedTicks.]

+ The expected idle time is checked again.  No context switches can occur now so the code will execute until the scheduler is unsuspended.  Assuming configEXPECTED_IDLE_TIME_BEFORE_SLEEP is set to a sensible value, a tick interrupt won't occur for some time.

+ portSUPPRESS_TICKS_AND_SLEEP() is called.

+ The default implementation of the tickless function calls eTaskConfirmSleep() - which prior to this change does not return eAbortSleep even though xPendedTicks is not 0, and after this change does return eAbortSleep.
2020-02-28 12:40:11 -08:00
Yuhui.Zheng
88e32327e9
version bump to v10.3.1 (#16)
* Verion bump from 10.3.0 to 10.3.1.
* version bump in task.h
* change history for 10.3.1.
2020-02-18 22:03:54 -08:00
Yuhui Zheng
210b1ffcc8 Re-sync with upstream and stripping away none kernel related. 2020-02-10 13:45:57 -08:00