Skip to content

Document the use of TX_LINUX_MULTI_CORE in ports/linux/gnu/readme_threadx.txt or remove altogether #445

@jleveque

Description

@jleveque

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 the TX_LINUX_MULTI_CORE #define and also the need to specify -D_GNU_SOURCE to have access to the cpu_set_t type and the CPU_COUNT, CPU_SET, and CPU_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 the cpu_set_t type and the CPU_COUNT, CPU_SET, and CPU_ZERO macros, so this would still require documentation.

Metadata

Metadata

Assignees

Labels

discussionFlagged for discussion during the weekly team meetingdocumentationImprovements or additions to documentationfeatureNew feature or enhancement request

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions