FreeRTOS-Kernel/portable
Chris Morgan 3baa3dd98b POSIX port - Switch from allowing the user to specify the stack memory itself, to allowing them to specify the stack size
Change from pthread_attr_setstack() to pthread_attr_setstacksize(), and automatically adjust the stack size
to be at least PTHREAD_STACK_MIN if it wasn't already, removing the size warning.

This permits the user to increase the pthread stack size beyond the PTHREAD_STACK_MIN default of 16384 if
desired, without producing a warning in the typical case where stacks are minimized for RAM limited targets.

Continue to store thread paramters on the provided stack, for consistency with the MCU targets.

Previously pthread_attr_setstack() was used to enable user defined stacks.

Note that:

1. The stack size can still be specified by the user.

2. pxPortInitialiseStack(), and pthread_addr_setstack() was failing on stacks of typical size, as
   these are smaller than PTHREAD_STACK_MIN (16384) bytes, and printing out a series of warnings.
   Improve usability by having the posix port automatically increase the stack size to be
   at least PTHREAD_STACK_MIN as posix platforms have enough memory for this not to be a concern.

3. Reuse of stack memory will also result in valgrind 'invalid write' errors to what is demonstrably
   valid memory. Root cause is that Valgrind is tracking a stack pointer as the stack is used.
   Reuse of a stack buffer results in the stack being used at its start, in an area that Valgrind thinks
   is far away from the start of the stack. There are ways to notify Valgrind of these changes
   however this would require linking against and calling Valgrind functions from the FreeRTOS application using
   the posix port, https://valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.clientreq.

   Also, apparently it isn't permitted by posix to reuse stack memory once its been used in a pthread via pthread_attr_setstack(),
   see https://stackoverflow.com/a/5422134
2024-01-11 10:53:54 -08:00
..
ARMClang Normalize line endings and whitespace in source files 2022-11-29 15:38:47 -08:00
ARMv8M Detect more startup config errors on Cortex M (#832) 2023-12-11 10:27:47 +05:30
BCC/16BitDOS Revert Portable/BCC formatting (#828) 2023-12-07 22:21:11 +05:30
CCS Revert formatting on CCS port files (#881) 2023-11-23 15:39:09 +05:30
CodeWarrior Revert Portable/CodeWarrior formatting (#831) 2023-12-07 21:46:33 +05:30
Common Fix prototype of MPU_vTimerSetReloadMode (#913) 2023-11-30 00:17:56 +00:00
GCC Fix portSET_INTERRUPT_MASK_FROM_ISR definition for atomic operation (#940) 2024-01-03 15:47:05 +08:00
IAR Fix portSET_INTERRUPT_MASK_FROM_ISR definition for atomic operation (#940) 2024-01-03 15:47:05 +08:00
Keil Normalize line endings and whitespace in source files 2022-11-29 15:38:47 -08:00
MemMang Fix typo in comment (#910) 2023-11-29 21:02:30 +05:30
MikroC/ARM_CM4F Revert the formatting changes on MikroC ports. (#882) 2023-11-23 15:50:15 +05:30
MPLAB Revert Portable/MPLAB Formatting (#883) 2023-11-23 15:59:40 +05:30
MSVC-MingW Upgrade msvc port to winsock2 (#895) 2023-11-28 20:16:16 +00:00
oWatcom/16BitDOS Revert Portable/oWatcom formatting (#829) 2023-12-07 22:10:50 +05:30
Paradigm/Tern_EE Revert Portable/Paradigm formatting (#830) 2023-12-07 22:02:49 +05:30
Renesas Add portMEMORY_BARRIER() to RX MCU ports (#864) 2023-11-29 15:52:16 +05:30
Rowley Revert formatting on Rowley ports (#884) 2023-11-23 16:23:55 +05:30
RVDS Detect more startup config errors on Cortex M (#832) 2023-12-11 10:27:47 +05:30
SDCC/Cygnal Revert formatting on SDCC ports (#885) 2023-11-23 16:44:36 +05:30
Softune Revert Portable/Softune Formatting (#886) 2023-11-23 17:09:28 +05:30
Tasking/ARM_CM4F Revert formatting on Tasking ports (#887) 2023-11-23 17:21:23 +05:30
template Add SMP template port and example (#900) 2023-12-04 10:49:41 +08:00
ThirdParty POSIX port - Switch from allowing the user to specify the stack memory itself, to allowing them to specify the stack size 2024-01-11 10:53:54 -08:00
WizC/PIC18 Revert Portable/WizC Formatting (#888) 2023-11-23 17:34:07 +05:30
CMakeLists.txt RP2040: Fix removal of idle_task_static_memory.c (#935) 2024-01-03 11:06:04 +05:30
readme.txt Normalize line endings and whitespace in source files 2022-11-29 15:38:47 -08:00

Each real time kernel port consists of three files that contain the core kernel
components and are common to every port, and one or more files that are
specific to a particular microcontroller and/or compiler.


+ The FreeRTOS/Source/Portable/MemMang directory contains the five sample
memory allocators as described on the https://www.FreeRTOS.org WEB site.

+ The other directories each contain files specific to a particular
microcontroller or compiler, where the directory name denotes the compiler
specific files the directory contains.



For example, if you are interested in the [compiler] port for the [architecture]
microcontroller, then the port specific files are contained in
FreeRTOS/Source/Portable/[compiler]/[architecture] directory.  If this is the
only port you are interested in then all the other directories can be
ignored.