Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jleveque opened this issue Mar 20, 2025 · 1 comment
Assignees
Labels
discussion Flagged for discussion during the weekly team meeting documentation Improvements or additions to documentation feature New feature or enhancement request

Comments

@jleveque
Copy link

jleveque commented Mar 20, 2025

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.

@jleveque jleveque added the feature New feature or enhancement request label Mar 20, 2025
@fdesbiens fdesbiens added documentation Improvements or additions to documentation discussion Flagged for discussion during the weekly team meeting labels Apr 1, 2025
@fdesbiens
Copy link
Contributor

Hi @jleveque.

Thank you for submitting this issue. I will discuss it with the project team.

Is there anyone in the @eclipse-threadx/iot-threadx-committers and @eclipse-threadx/iot-threadx-contributors groups willing to work on this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Flagged for discussion during the weekly team meeting documentation Improvements or additions to documentation feature New feature or enhancement request
Projects
None yet
Development

No branches or pull requests

3 participants