Home | History | Annotate | Download | only in testdata

Lines Matching refs:sync

4 	"sync"
5 "sync/atomic"
9 var x *sync.Mutex
11 var y sync.Mutex
14 var z = sync.Mutex{}
15 w := sync.Mutex{}
17 w = sync.Mutex{}
18 q := struct{ L sync.Mutex }{
19 L: sync.Mutex{},
25 once: sync.Once{},
29 nl := new(sync.Mutex)
30 mx := make([]sync.Mutex, 10)
31 xx := struct{ L *sync.Mutex }{
32 L: new(sync.Mutex),
37 once sync.Once
41 var x *sync.Mutex
43 var y sync.Mutex
45 *p = *x // ERROR "assignment copies lock value to \*p: sync.Mutex"
50 *tp = t // ERROR "assignment copies lock value to \*tp: testdata.Tlock contains sync.Once contains sync.Mutex"
51 t = *tp // ERROR "assignment copies lock value to t: testdata.Tlock contains sync.Once contains sync.Mutex"
53 y := *x // ERROR "assignment copies lock value to y: sync.Mutex"
54 var z = t // ERROR "variable declaration copies lock value to z: testdata.Tlock contains sync.Once contains sync.Mutex"
56 w := struct{ L sync.Mutex }{
57 L: *x, // ERROR "literal copies lock value from \*x: sync.Mutex"
60 1: t, // ERROR "literal copies lock value from t: testdata.Tlock contains sync.Once contains sync.Mutex"
61 2: *tp, // ERROR "literal copies lock value from \*tp: testdata.Tlock contains sync.Once contains sync.Mutex"
64 t, // ERROR "literal copies lock value from t: testdata.Tlock contains sync.Once contains sync.Mutex"
65 *tp, // ERROR "literal copies lock value from \*tp: testdata.Tlock contains sync.Once contains sync.Mutex"
70 new(t) // ERROR "call of new copies lock value: testdata.Tlock contains sync.Once contains sync.Mutex"
73 var muA [5]sync.Mutex
74 muB := muA // ERROR "assignment copies lock value to muB: sync.Mutex"
75 muA = muB // ERROR "assignment copies lock value to muA: sync.Mutex"
79 var mmuA [5][5]sync.Mutex
80 mmuB := mmuA // ERROR "assignment copies lock value to mmuB: sync.Mutex"
81 mmuA = mmuB // ERROR "assignment copies lock value to mmuA: sync.Mutex"
85 var fmuA [5][][5]sync.Mutex
92 var a [5]sync.Mutex
99 len(a) // ERROR "call of len copies lock value: sync.Mutex"
102 cap(a) // ERROR "call of cap copies lock value: sync.Mutex"
105 // SyncTypesCheck checks copying of sync.* types except sync.Mutex
107 // sync.RWMutex copying
108 var rwmuX sync.RWMutex
109 var rwmuXX = sync.RWMutex{}
110 rwmuX1 := new(sync.RWMutex)
111 rwmuY := rwmuX // ERROR "assignment copies lock value to rwmuY: sync.RWMutex"
112 rwmuY = rwmuX // ERROR "assignment copies lock value to rwmuY: sync.RWMutex"
113 var rwmuYY = rwmuX // ERROR "variable declaration copies lock value to rwmuYY: sync.RWMutex"
115 rwmuZ := &sync.RWMutex{}
117 // sync.Cond copying
118 var condX sync.Cond
119 var condXX = sync.Cond{}
120 condX1 := new(sync.Cond)
121 condY := condX // ERROR "assignment copies lock value to condY: sync.Cond contains sync.noCopy"
122 condY = condX // ERROR "assignment copies lock value to condY: sync.Cond contains sync.noCopy"
123 var condYY = condX // ERROR "variable declaration copies lock value to condYY: sync.Cond contains sync.noCopy"
125 condZ := &sync.Cond{
126 L: &sync.Mutex{},
128 condZ = sync.NewCond(&sync.Mutex{})
130 // sync.WaitGroup copying
131 var wgX sync.WaitGroup
132 var wgXX = sync.WaitGroup{}
133 wgX1 := new(sync.WaitGroup)
134 wgY := wgX // ERROR "assignment copies lock value to wgY: sync.WaitGroup contains sync.noCopy"
135 wgY = wgX // ERROR "assignment copies lock value to wgY: sync.WaitGroup contains sync.noCopy"
136 var wgYY = wgX // ERROR "variable declaration copies lock value to wgYY: sync.WaitGroup contains sync.noCopy"
138 wgZ := &sync.WaitGroup{}
140 // sync.Pool copying
141 var poolX sync.Pool
142 var poolXX = sync.Pool{}
143 poolX1 := new(sync.Pool)
144 poolY := poolX // ERROR "assignment copies lock value to poolY: sync.Pool contains sync.noCopy"
145 poolY = poolX // ERROR "assignment copies lock value to poolY: sync.Pool contains sync.noCopy"
146 var poolYY = poolX // ERROR "variable declaration copies lock value to poolYY: sync.Pool contains sync.noCopy"
148 poolZ := &sync.Pool{}
150 // sync.Once copying
151 var onceX sync.Once
152 var onceXX = sync.Once{}
153 onceX1 := new(sync.Once)
154 onceY := onceX // ERROR "assignment copies lock value to onceY: sync.Once contains sync.Mutex"
155 onceY = onceX // ERROR "assignment copies lock value to onceY: sync.Once contains sync.Mutex"
156 var onceYY = onceX // ERROR "variable declaration copies lock value to onceYY: sync.Once contains sync.Mutex"
158 onceZ := &sync.Once{}
161 // AtomicTypesCheck checks copying of sync/atomic types
167 vY := vX // ERROR "assignment copies lock value to vY: sync/atomic.Value contains sync/atomic.noCopy"
168 vY = vX // ERROR "assignment copies lock value to vY: sync/atomic.Value contains sync/atomic.noCopy"
169 var vYY = vX // ERROR "variable declaration copies lock value to vYY: sync/atomic.Value contains sync/atomic.noCopy"