Skip to content

[go1.20] Add SemacquireRWMutex #1319

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
merged 1 commit into from
Jul 2, 2024

Conversation

grantnelson-wf
Copy link
Collaborator

@grantnelson-wf grantnelson-wf commented Jul 2, 2024

Add in the runtime_SemacquireRWMutexR and runtime_SemacquireRWMutex methods. I routed them both through the existing runtime_SemacquireMutex since "they're functionally identical." according to below.

From the source...

// Semacquire(RW)Mutex(R) is like Semacquire, but for profiling contended
// Mutexes and RWMutexes.
// If lifo is true, queue waiter at the head of wait queue.
// skipframes is the number of frames to omit during tracing, counting from
// runtime_SemacquireMutex's caller.
// The different forms of this function just tell the runtime how to present
// the reason for waiting in a backtrace, and is used to compute some metrics.
// Otherwise they're functionally identical.
func runtime_SemacquireMutex(s *uint32, lifo bool, skipframes int)
func runtime_SemacquireRWMutexR(s *uint32, lifo bool, skipframes int)
func runtime_SemacquireRWMutex(s *uint32, lifo bool, skipframes int)

The CI will still not pass for go1.20 but it will no longer complain about these two methods not being implemented.

This is part of #1270

@nevkontakte nevkontakte merged commit 451b445 into gopherjs:go1.20 Jul 2, 2024
4 of 8 checks passed
@nevkontakte
Copy link
Member

Thanks! 🎉

@grantnelson-wf grantnelson-wf deleted the addSemacquireRWMutex branch July 2, 2024 21:59
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.

3 participants