Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove thread pointer from AwareLock #112715

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

Merged

Conversation

eduardo-vp
Copy link
Member

@eduardo-vp eduardo-vp commented Feb 19, 2025

Removing the thread pointer present in AwareLock since now it holds the thread id.

Verified with SOS SyncBlk command and with the VS debugger that the thread pointer still can be retrieved.

Follow-up work of #107168.

Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

@eduardo-vp eduardo-vp marked this pull request as ready for review February 20, 2025 20:37
@Copilot Copilot AI review requested due to automatic review settings February 20, 2025 20:37
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

@eduardo-vp eduardo-vp requested a review from kouvel February 20, 2025 20:37
Copy link
Member

@kouvel kouvel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor comment, otherwise LGTM, thanks!

#endif // !DACCESS_COMPILE

// the DAC needs to have this method available
PTR_Thread AwareLock::GetHoldingThread()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Would be good to replace the two remaining references to this function outside of the DAC, from threads.cpp in stress logs, to report the holding thread ID instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, these seem to only be under a macro that is not set, and only for diagnostic purposes.

@eduardo-vp eduardo-vp merged commit 050c506 into dotnet:main Feb 24, 2025
94 checks passed
@eduardo-vp eduardo-vp deleted the remove-thread-pointer-from-aware-lock branch February 24, 2025 19:08
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants