MCPcopy Create free account
hub / github.com/cloudwego/netpoll / lock

Function lock

fd_operator_cache.go:91–95  ·  view source on GitHub ↗
(locked *int32)

Source from the content-addressed store, hash-verified

89}
90
91func lock(locked *int32) {
92 for !atomic.CompareAndSwapInt32(locked, 0, 1) {
93 runtime.Gosched()
94 }
95}
96
97func unlock(locked *int32) {
98 atomic.StoreInt32(locked, 0)

Callers 3

allocMethod · 0.85
freeableMethod · 0.85
freeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…