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

no need to unlock and lock again #2597

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yutongqing
Copy link

the lock session->bug_rwlock has already been locked in write mode, no need to unlock and then lock again

the lock session->bug_rwlock has already been locked in write mode, no need to unlock and then lock again
@seven1240
Copy link
Collaborator

I think it is intended. So it can release the CPU and other threads would have a chance to get that lock and do sth. useful. Actually, maybe better to add a switch_yield(1) before the next lock so it would be better to tell the kernel that the current thread would like to release the CPU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants