Home | History | Annotate | Download | only in testdata

Lines Matching refs:sync

4 	"sync"
5 "sync/atomic"
12 var x *sync.Mutex
14 var y sync.Mutex
17 var z = sync.Mutex{}
18 w := sync.Mutex{}
20 w = sync.Mutex{}
21 q := struct{ L sync.Mutex }{
22 L: sync.Mutex{},
28 once: sync.Once{},
32 nl := new(sync.Mutex)
33 mx := make([]sync.Mutex, 10)
34 xx := struct{ L *sync.Mutex }{
35 L: new(sync.Mutex),
40 once sync.Once
44 var x *sync.Mutex
46 var y sync.Mutex
48 *p = *x // ERROR "assignment copies lock value to \*p: sync.Mutex"
53 *tp = t // ERROR "assignment copies lock value to \*tp: testdata.Tlock contains sync.Once contains sync.Mutex"
54 t = *tp // ERROR "assignment copies lock value to t: testdata.Tlock contains sync.Once contains sync.Mutex"
56 y := *x // ERROR "assignment copies lock value to y: sync.Mutex"
57 var z = t // ERROR "variable declaration copies lock value to z: testdata.Tlock contains sync.Once contains sync.Mutex"
59 w := struct{ L sync.Mutex }{
60 L: *x, // ERROR "literal copies lock value from \*x: sync.Mutex"
63 1: t, // ERROR "literal copies lock value from t: testdata.Tlock contains sync.Once contains sync.Mutex"
64 2: *tp, // ERROR "literal copies lock value from \*tp: testdata.Tlock contains sync.Once contains sync.Mutex"
67 t, // ERROR "literal copies lock value from t: testdata.Tlock contains sync.Once contains sync.Mutex"
68 *tp, // ERROR "literal copies lock value from \*tp: testdata.Tlock contains sync.Once contains sync.Mutex"
73 new(t) // ERROR "call of new copies lock value: testdata.Tlock contains sync.Once contains sync.Mutex"
76 var muA [5]sync.Mutex
77 muB := muA // ERROR "assignment copies lock value to muB: sync.Mutex"
78 muA = muB // ERROR "assignment copies lock value to muA: sync.Mutex"
82 var mmuA [5][5]sync.Mutex
83 mmuB := mmuA // ERROR "assignment copies lock value to mmuB: sync.Mutex"
84 mmuA = mmuB // ERROR "assignment copies lock value to mmuA: sync.Mutex"
88 var fmuA [5][][5]sync.Mutex
95 var a [5]sync.Mutex
102 len(a) // ERROR "call of len copies lock value: sync.Mutex"
105 cap(a) // ERROR "call of cap copies lock value: sync.Mutex"
109 var mu sync.Mutex
114 unsafe.Sizeof(mu) // ERROR "call of unsafe.Sizeof copies lock value: sync.Mutex"
116 Sizeof(mu) // ERROR "call of Sizeof copies lock value: sync.Mutex"
119 // SyncTypesCheck checks copying of sync.* types except sync.Mutex
121 // sync.RWMutex copying
122 var rwmuX sync.RWMutex
123 var rwmuXX = sync.RWMutex{}
124 rwmuX1 := new(sync.RWMutex)
125 rwmuY := rwmuX // ERROR "assignment copies lock value to rwmuY: sync.RWMutex"
126 rwmuY = rwmuX // ERROR "assignment copies lock value to rwmuY: sync.RWMutex"
127 var rwmuYY = rwmuX // ERROR "variable declaration copies lock value to rwmuYY: sync.RWMutex"
129 rwmuZ := &sync.RWMutex{}
131 // sync.Cond copying
132 var condX sync.Cond
133 var condXX = sync.Cond{}
134 condX1 := new(sync.Cond)
135 condY := condX // ERROR "assignment copies lock value to condY: sync.Cond contains sync.noCopy"
136 condY = condX // ERROR "assignment copies lock value to condY: sync.Cond contains sync.noCopy"
137 var condYY = condX // ERROR "variable declaration copies lock value to condYY: sync.Cond contains sync.noCopy"
139 condZ := &sync.Cond{
140 L: &sync.Mutex{},
142 condZ = sync.NewCond(&sync.Mutex{})
144 // sync.WaitGroup copying
145 var wgX sync.WaitGroup
146 var wgXX = sync.WaitGroup{}
147 wgX1 := new(sync.WaitGroup)
148 wgY := wgX // ERROR "assignment copies lock value to wgY: sync.WaitGroup contains sync.noCopy"
149 wgY = wgX // ERROR "assignment copies lock value to wgY: sync.WaitGroup contains sync.noCopy"
150 var wgYY = wgX // ERROR "variable declaration copies lock value to wgYY: sync.WaitGroup contains sync.noCopy"
152 wgZ := &sync.WaitGroup{}
154 // sync.Pool copying
155 var poolX sync.Pool
156 var poolXX = sync.Pool{}
157 poolX1 := new(sync.Pool)
158 poolY := poolX // ERROR "assignment copies lock value to poolY: sync.Pool contains sync.noCopy"
159 poolY = poolX // ERROR "assignment copies lock value to poolY: sync.Pool contains sync.noCopy"
160 var poolYY = poolX // ERROR "variable declaration copies lock value to poolYY: sync.Pool contains sync.noCopy"
162 poolZ := &sync.Pool{}
164 // sync.Once copying
165 var onceX sync.Once
166 var onceXX = sync.Once{}
167 onceX1 := new(sync.Once)
168 onceY := onceX // ERROR "assignment copies lock value to onceY: sync.Once contains sync.Mutex"
169 onceY = onceX // ERROR "assignment copies lock value to onceY: sync.Once contains sync.Mutex"
170 var onceYY = onceX // ERROR "variable declaration copies lock value to onceYY: sync.Once contains sync.Mutex"
172 onceZ := &sync.Once{}
175 // AtomicTypesCheck checks copying of sync/atomic types