Commit graph

78 commits

Author SHA1 Message Date
Tobias Reinhard
8b958c7834 Axiomatized knowledge about RP2040 architecture and added tmp workaround for over/underflows. 2022-10-25 14:34:01 -04:00
Tobias Reinhard
06bc0fbb2d Resolved VF reporting type errors for memset call and disproved some overflows and underflows. 2022-10-25 13:58:06 -04:00
Tobias Reinhard
1042ea8cf8 Refined task control block predicate TCB_p such that it can be used to justify memset-ing the stack. 2022-10-25 13:22:10 -04:00
Tobias Reinhard
80134a65ed VeriFast cannot handle casts of side-effectful expressions. 2022-10-25 12:49:33 -04:00
Tobias Reinhard
5a7916bff0 Added predicates to reason about TCB_t and substructures. 2022-10-24 16:17:41 -04:00
Tobias Reinhard
f1a0170309 Initialized memory safety proof for xTaskCreate. 2022-10-24 12:29:55 -04:00
Tobias Reinhard
47e6fa7398 Resolved VF parse errors: const pointers. 2022-10-22 14:02:04 -04:00
Tobias Reinhard
663ea1fb77 Resolved VF parse errors.
- const pointers
- inline assembler
- statements blocks consisting of multiple elements used in expression contexts, e.g., `({e1 e2;})`
- multiple pointer declarations to user-defined types in single line, i.e., `A *p1, *p2;`
2022-10-22 13:52:12 -04:00
Tobias Reinhard
55cfee8798 Resolved VF parse error: VF does not support const pointers. 2022-10-22 13:28:40 -04:00
Tobias Reinhard
342ab6463c Resolved VF parse error: VF does not support const pointers. 2022-10-22 13:00:58 -04:00
Tobias Reinhard
eeae596776 Replaced asm macro by failing assertion. 2022-10-22 12:39:54 -04:00
Tobias Reinhard
ee70a7815d Resolved VF parse error. Deleted functions involving inline assembler. 2022-10-13 12:52:57 -04:00
Tobias Reinhard
497a23d2eb Renamed VERIFAST_PROOF define into VERIFAST. 2022-10-11 15:32:57 -04:00
Tobias Reinhard
0c3f65d8ad Setup environment for VeriFast proof and start script for vfide. 2022-10-11 12:20:41 -04:00
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.
2022-06-22 10:03:44 +05:30
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
2022-05-31 16:11:02 -07:00
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()
2022-03-18 10:16:21 -07:00
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.
2022-03-06 14:21:39 -08:00
Gaurav-Aggarwal-AWS
2b0fdf2a71
Add SMP in the License Header (#402)
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2021-10-13 18:38:24 -07:00
Gaurav-Aggarwal-AWS
970b678a0b
SMP version (#401)
* Update version number for SMP

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2021-10-13 18:23:03 -07:00
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>
2021-10-10 23:16:16 -07:00
N3xed
a2c8db1089
Move uxCoreAffinityMask after xMPUSettings (#372)
Allows for much easier assembly access to the field.
2021-07-29 23:58:47 -07:00
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
2021-05-19 16:19:57 -07:00
Joseph Julicher
0c1381311b
Merge branch 'smp' into smp 2021-05-19 10:10:36 -07:00
Joseph Julicher
d58750f5f9 Updated from upstream 2021-05-19 10:02:49 -07:00
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
2021-05-19 09:40:43 -07:00
Joseph Julicher
bc42e04850 Uncrustified tasks.c 2021-05-19 09:29:09 -07:00
Joseph Julicher
74f816ab40 Adjustments to tasks from PR review 2021-05-19 09:24:46 -07:00
Joseph Julicher
a65f379860 added multiple idle tasks 2021-05-19 09:21:09 -07:00
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
2021-05-19 09:15:19 -07:00
Joseph Julicher
61fa224694 missed taskYield in minimalIDLE task 2021-05-19 08:54:22 -07:00
Joseph Julicher
106e15ea6b Uncrustified tasks.c 2021-05-19 08:38:58 -07:00
Joseph Julicher
87279a3dc7 Fixed static allocation internal array 2021-05-18 19:49:02 -07:00
Joseph Julicher
6369b03bd1 fixed additional bit mask test errors 2021-05-18 15:17:50 -07:00
Joseph Julicher
56d94df0a8 Fixed bit mask compare bug 2021-05-18 15:07:26 -07:00
Joseph Julicher
d59bfca4f9 converted exclusion to affinity 2021-05-13 17:20:41 -07:00
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
2021-05-13 15:42:57 -07:00
Joseph Julicher
b9a17479a0 Adjustments to tasks from PR review 2021-05-12 17:01:59 -07:00
Joseph Julicher
ad317efd62 Added multiple IDLE tasks to non-static allocation 2021-05-12 12:13:44 -07:00
Joseph Julicher
80457ca165 added multiple idle tasks 2021-05-12 12:03:08 -07:00
Joseph Julicher
ddf9007606 Added a rough pico support. Remove rtos_prints from task.c 2021-03-16 16:06:23 -07:00
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>
2021-03-15 17:29:08 -07:00
alfred gedeon
4b5d1e4395
Comment: fix code comment for xTaskAbortDelay (#272) 2021-03-05 09:13:03 -08:00
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>
2021-03-01 18:10:00 -07:00
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>
2021-02-23 18:36:27 -08:00
nazar01
6b4a3d0a6e
Typos (#248)
* Fix typos in FreeRTOS.h

* Fix typos in task.h

* Fix typos in tasks.c
2021-01-29 12:05:04 -08:00
Cobus van Eeden
ec62f69dab [AUTO][RELEASE]: Bump file header version to "10.4.3" 2020-12-14 10:13:39 -08:00
David Chalco
337bca615e [AUTO][RELEASE]: Bump file header version to "10.4.2" 2020-11-10 14:42:58 -08:00
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>
2020-10-22 17:09:35 -07:00
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.
2020-10-11 14:04:49 -07:00