Document the use of TX_LINUX_MULTI_CORE
in ports/linux/gnu/readme_threadx.txt
or remove altogether
#445
Labels
discussion
Flagged for discussion during the weekly team meeting
documentation
Improvements or additions to documentation
feature
New feature or enhancement request
Is your feature request related to a problem? Please describe.
Currently the
TX_LINUX_MULTI_CORE
#define is not documented, and without knowledge of the existence of this flag, trying to compile and run ThreadX on a multi-core Linux system can cause strange behaviors that are hard to track down due to threads running simultaneously on different cores.Describe the solution you'd like
Update
ports/linux/gnu/readme_threadx.txt
with a section describing theTX_LINUX_MULTI_CORE
#define and also the need to specify-D_GNU_SOURCE
to have access to thecpu_set_t
type and theCPU_COUNT
,CPU_SET
, andCPU_ZERO
macros.Describe alternatives you've considered
Alternatively, consider removing the
TX_LINUX_MULTI_CORE
#define altogether and unconditionally execute the code in_tx_initialize_low_level()
which checks the number of cores and, if >1, will select a single core at random. Note that this solution would still require the developer to speficy-D_GNU_SOURCE
to have access to thecpu_set_t
type and theCPU_COUNT
,CPU_SET
, andCPU_ZERO
macros, so this would still require documentation.The text was updated successfully, but these errors were encountered: