mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-05-12 11:42:57 -04:00
portPOINTER_SIZE_TYPE is used in FreeRTOS to store both pointer and integer values. Using a plain integer type for this purpose is unsafe on architectures that distinguish between pointers and integers, where an integer type (e.g. uint64_t) may not be able to represent all pointer values. The standard intptr_t type is explicitly defined to safely hold either a pointer or an integer. This commit changes portPOINTER_SIZE_TYPE to intptr_t, similar to the existing POSIX port, improving portability of the RISC-V port. Similarly, portSTACK_TYPE is used to store word-sized values on the stack that may represent either integers or pointers, and is often cast to pointer types. Changing it to uintptr_t makes this usage explicit and correct, improving portability, intent, and safety for capability-based extensions such as CHERI-RISC-V. Signed-off-by: Hesham Almatary <Hesham.Almatary@cl.cam.ac.uk> |
||
|---|---|---|
| .. | ||
| ARMClang | ||
| ARMv8M | ||
| BCC/16BitDOS | ||
| CCRH/F1Kx | ||
| CCS | ||
| CodeWarrior | ||
| Common | ||
| GCC | ||
| IAR | ||
| Keil | ||
| MemMang | ||
| MikroC/ARM_CM4F | ||
| MPLAB | ||
| MSVC-MingW | ||
| oWatcom/16BitDOS | ||
| Paradigm/Tern_EE | ||
| Renesas | ||
| Rowley | ||
| RVDS | ||
| SDCC/Cygnal | ||
| Softune | ||
| Tasking/ARM_CM4F | ||
| template | ||
| ThirdParty | ||
| WizC/PIC18 | ||
| CMakeLists.txt | ||
| readme.txt | ||
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.