diff options
| author | Frédéric Desbiens <[email protected]> | 2025-09-28 23:22:13 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-09-28 23:22:13 +0100 |
| commit | c4ad279b85fcf836c0b42d3e140fc32f0554e7b5 (patch) | |
| tree | 5e2593fe4ed0d57041ad46fd0f3d88b2c88b8561 /ports/linux | |
| parent | 12dac1d67d0dfe1c06f839ee285e190c759865a7 (diff) | |
| parent | 8a744afc1c4a3891db948d5cb5a93b86d1485cef (diff) | |
Merge pull request #468 from eclipse-threadx/devv6.4.3.202503_rel
Merge changes included in the v6.4.3.202503 release.
Diffstat (limited to 'ports/linux')
| -rw-r--r-- | ports/linux/gnu/readme_threadx.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ports/linux/gnu/readme_threadx.txt b/ports/linux/gnu/readme_threadx.txt index e3ac5cf6..997607c7 100644 --- a/ports/linux/gnu/readme_threadx.txt +++ b/ports/linux/gnu/readme_threadx.txt @@ -33,6 +33,26 @@ You should observe the compilation of sample_threadx.c (which is the demonstrati application) and linking with tx.a. The resulting file DEMO is a binary file that can be executed. +2.1 Includes + +Notice that the demonstration Makefile includes defines for _GNU_SOURCE +and TX_LINUX_MULTI_CORE. These are necessary to enable GNU/Linux-specific +compatibility for ThreadX using the Linux kernel in multi-core devices, +including the option to control processor affinity. See the GNU documentation +on CPU affinity and Feature Test Macros for more information. + +TX_LINUX_MULTI_CORE is necessary to enable code that constrains ThreadX to +one core, to prevent unintended behavior when threads execute simultaneously +across multiple cores. The enabled code configures CPU affinity, requiring +the use of macros such as CPU_SET and functions such as sched_setaffinity. +Access to these macros and functions (and the underlying types for the latter) +are enabled via the definition of _GNU_SOURCE. + +When building your own application, the _GNU_SOURCE and TX_LINUX_MULTI_CORE +symbols can be defined by being passed to the compiler (e.g. -D_GNU_SOURCE) or +in the optional user-defined ThreadX user define file tx_user.h. In the latter +case, ensure that the symbol TX_INCLUDE_USER_DEFINE_FILE is defined, to instruct +the tx_port.h header to include tx_user.h. 3. System Initialization |
