-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix: wrap logging buffer writes in critical section in Windows logging implementation #1039
base: main
Are you sure you want to change the base?
Conversation
* reading from the buffer). */ | ||
xCurrentTask = GetCurrentThread(); | ||
iOriginalPriority = GetThreadPriority( xCurrentTask ); | ||
SetThreadPriority( GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL ); |
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.
A naive question: Why wasn't this able to achieve the same thing as taskENTER_CRITICAL()
?
/bot run formatting |
49e66ea
@ydhuang28 I think |
* Adding SMP coverity example * Add coverity scan flow * Fix format * Update README.md * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: Ubuntu <ubuntu@ip-172-31-34-245.ap-northeast-1.compute.internal> Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Wrap logging buffer writes in critical section in Windows logging implementation
Description
WinSim (by virtue of Windows behavior) does not change task priority correctly/immediately. previously the logging buffer writes were protected by raising and lower task priority, which doesn't protect the buffer properly. This fix addresses that.
Test Steps
n/a
Checklist:
Related Issue
n/a
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.