Skip to content
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

ThreadX modules and SMP #415

Open
yf13 opened this issue Oct 17, 2024 · 7 comments
Open

ThreadX modules and SMP #415

yf13 opened this issue Oct 17, 2024 · 7 comments
Assignees

Comments

@yf13
Copy link

yf13 commented Oct 17, 2024

@billamiework and @goldscott, can you teach if ThreadX modules support SMP or not?

On one side, we have ports_module/cortex_a35_smp, so modules should support SMP already.

On the other side, I got following error when building modules with my RiscV SMP port:

[243/342] Building C object CMakeFiles...txm_module_manager_thread_create.c.obj
...
txm_module_manager_thread_create.c:671:30: warning: assignment to 'TX_THREAD *' {aka 'struct TX_THREAD_STRUCT *'} from incompatible pointer type 'TX_THREAD **' {aka 'struct TX_THREAD_STRUCT **'} [-Wincompatible-pointer-types]
  671 |             saved_thread_ptr =  _tx_thread_execute_ptr;
@yf13 yf13 changed the title Modules with SMP ports status ThreadX modules and SMP Oct 18, 2024
@fdesbiens
Copy link
Contributor

Thank you for reaching out @yf13. I will discuss this with the team.

@billlamiework
Copy link

Hi @yf13,

It looks like you are correct - I see the ports_module/cortex_a35_smp folder and the contents do appear to support SMP mode. Don't forget that you should also make sure you are using the threadx/common_smp generic source code (non Module source). For example, there are macros that convert _tx_thread_execute_ptr into an array (indexed by core) for SMP use. Hopefully, that will helps!

@fdesbiens
Copy link
Contributor

@yf13 Do you still need assistance? Otherwise, I will close this issue.

@yf13
Copy link
Author

yf13 commented Dec 13, 2024

@billlamiework and @fdesbiens, thanks for the information.
Acutally I am still having puzzles. The txm_module_manager_thread_create.c belongs to common_modules/module_manager. Thus it doesn't support SMP.

If we are not missing a common_modules_smp/ folder, then the current version of common_modules/ should be upgraded to support SMP?

@billlamiework
Copy link

Hi @yf13,
Have you actually tried to build an SMP version or is it just concerning that there isn't a common_modules_smp folder? I ask because there are macro redefines for SMP that convert ThreadX from single core to SMP.

@yf13
Copy link
Author

yf13 commented Dec 14, 2024

@have you actually tried to build an SMP version

Yes I did and got build error as shown in issue description.

@billlamiework
Copy link

Hi @yf13,
I see the build error now at the beginning of the thread, and it does appear something is missing with SMP and module support. If you want to discuss some options for recreating this support, please feel free to reach out to me via email: [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants