-
Notifications
You must be signed in to change notification settings - Fork 328
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
break from long loops on shutdown request #971
Conversation
a5d385f
to
b0bdd59
Compare
Related patch to mainline OpenOCD: https://review.openocd.org/c/openocd/+/8032 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this improvement.
As already noted in the upstream review (https://review.openocd.org/c/openocd/+/8032):
- Please create a new error code to denote interrupted operation, e.g. ERROR_INTERRUPTED or ERROR_SHUTDOWN
- Is the new function
openocd_shutdown_by_signal()
needed? If so, please give it a better name.
c8573c8
to
0658f6c
Compare
620aa69
to
f50344c
Compare
@JanMatCodasip, can you please take a look at this one. The only difference with recently merged to mainline https://review.openocd.org/gitweb?p=openocd.git;a=commitdiff;h=2e920a212fbe2de705811d547c169c1ae1611a02 is RISC-V specific. |
f50344c
to
ff16900
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you.
@en-sc There is now a little conflict in |
In loops that typically take longer time to complete, check if there is a pending shutdown request. If so, terminate the loop. This allows to respond to a signal requesting a shutdown during some loops which do not return control to main OpenOCD loop. Change-Id: Iace0b58eddde1237832d0f9333a7c7b930565674 Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
ff16900
to
8dbb125
Compare
@JanMatCodasip, I've resolved the merge conflict you mentioned. Please, take a look. |
Thank you. If nobody comes with any other feedback, let's merge tomorrow. Generally, I would recommend to have a cool-down period 1-2 days for approved merge requests prior to the actual merge -- to give anyone from the community some time window to post additional comments, if desired so. |
In loops that typically take longer time to complete, check if there is a pending shutdown request. If so, terminate the loop. This allows to respond to a signal requesting a shutdown during some loops which do not return control to main OpenOCD loop.