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

Dose threadx module has 'who am I' utility? #376

Open
amgross opened this issue Mar 19, 2024 · 0 comments
Open

Dose threadx module has 'who am I' utility? #376

amgross opened this issue Mar 19, 2024 · 0 comments
Labels
feature New feature or enhancement request

Comments

@amgross
Copy link

amgross commented Mar 19, 2024

Is your feature request related to a problem? Please describe.
In regular threadx, each thread can know is identity and basic data on himself by accessing its thread pointer using the global variable that holds current thread pointer (TX_THREAD_GET_CURRENT).
But in threadx modules (at least with memory protection) there is no (as far as I know) global that holding the current thread pointer. There is in the beginning of the stack of each thread TXM_MODULE_THREAD_ENTRY_INFO struct which holds also the thread pointer, but there is no global that holds pointer to the beginning of current stack, just _txm_module_entry_info which point to this struct in the start_stop thread.

Describe the solution you'd like
Some utility in module to get the pointer of current thread TXM_MODULE_THREAD_ENTRY_INFO.

Describe alternatives you've considered
Solution probably need to be done in the assembly level as part of the context switches and kernel-user switches, which is hard work, I would prefer easier solution

Additional context

@amgross amgross added the feature New feature or enhancement request label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or enhancement request
Projects
None yet
Development

No branches or pull requests

1 participant