sync/atomic.Int32.CompareAndSwap (method)

10 uses

	sync/atomic (current package)
		type.go#L89: func (x *Int32) CompareAndSwap(old, new int32) (swapped bool) {

	sync
		rwmutex.go#L100: 		if rw.readerCount.CompareAndSwap(c, c+1) {
		rwmutex.go#L180: 	if !rw.readerCount.CompareAndSwap(0, -rwmutexMaxReaders) {

	crypto/tls
		conn.go#L1209: 		if c.activeCall.CompareAndSwap(x, x+2) {
		conn.go#L1431: 		if c.activeCall.CompareAndSwap(x, x|1) {

	github.com/refraction-networking/utls
		conn.go#L1213: 		if c.activeCall.CompareAndSwap(x, x+2) {
		conn.go#L1433: 		if c.activeCall.CompareAndSwap(x, x|1) {
		u_conn.go#L434: 		if c.activeCall.CompareAndSwap(x, x+2) {

	os
		exec.go#L98: 		if ph.refs.CompareAndSwap(refs, refs+1) {
		exec.go#L111: 		if ph.refs.CompareAndSwap(refs, refs-1) {