esp_execute_shared_stack_function thread safety
esp_execute_shared_stack_function thread safety
I was wondering whether I could call esp_execute_shared_stack_function from multiple tasks. Looking at the implementation, the function doesn't seem to be thread safe. Mainly because it uses global static variables (e.g. xtensa_shared_stack_callback). Although I have to pass a mutex, this is only used to guard access to the stack memory also provided.
-
- Posts: 9723
- Joined: Thu Nov 26, 2015 4:08 am
Re: esp_execute_shared_stack_function thread safety
Yeah, that looks like a bug, good catch. I'll file an internal issue.
Re: esp_execute_shared_stack_function thread safety
Thanks for the quick reply!
Please note the open issue on GitHub, which is also affected by the function, but not related to my issue: https://github.com/espressif/esp-idf/issues/10414.
While I'm at it: it would be really nice if I could pass void* arg to esp_execute_shared_stack_function, so that my callback receives the void* arg when called on the external stack.
Please note the open issue on GitHub, which is also affected by the function, but not related to my issue: https://github.com/espressif/esp-idf/issues/10414.
While I'm at it: it would be really nice if I could pass void* arg to esp_execute_shared_stack_function, so that my callback receives the void* arg when called on the external stack.
Who is online
Users browsing this forum: No registered users and 318 guests