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

xtensa/esp32: add lock for async operation work #15385

Merged

Conversation

sdc-g
Copy link
Contributor

@sdc-g sdc-g commented Dec 30, 2024

Note: Please adhere to Contributing Guidelines.

Summary

g_work as singleton can be changed by context switching, but previous one async operation have not finished yet.

adapt based on: 10a1d17

Impact

one additonal mutex is used for g_work to keep the sequence correctly.

Testing

reproduce and verified by below steps

Variable g_wrok is sent to work_queue() function and set value to this variable.
Another context changes g_work by call esp32_async_op during step 1. g_work of Step 1 is changed because g_work is singleton.
Step 1 hanges because g_work of step 1 are cleared by step 2.

g_work as singleton can be changed by context switching,
but previous one async operation have not finished yet.

adapt based on: 10a1d17
@github-actions github-actions bot added Arch: xtensa Issues related to the Xtensa architecture Size: XS The size of the change in this PR is very small labels Dec 30, 2024
@xiaoxiang781216 xiaoxiang781216 merged commit da84516 into apache:master Dec 30, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: xtensa Issues related to the Xtensa architecture Size: XS The size of the change in this PR is very small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants