Where can i find runtime function source code such as runtime_Semacquire?

see https://golang.org/src/sync/runtime.go

I believe @ha0ck is asking where the implementation of that function can be found.

I am not 100% certain but I think this is what he wants - https://golang.org/src/runtime/sema.go

See the lines that read:

//go:linkname sync_runtime_SemacquireMutex sync.runtime_SemacquireMutex
func sync_runtime_SemacquireMutex(addr *uint32) {
	semacquire(addr, semaBlockProfile|semaMutexProfile)
}
1 Like

Yes, probably the implementation is more interesting. It is a small step, though :slight_smile:

Thanks!
This is what i want.:slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.