Lines Matching refs:target

101 	atomic_t target, orig;  in ZTEST_USER()  local
112 target = 4; in ZTEST_USER()
117 zassert_false(atomic_cas(&target, oldvalue, value), "atomic_cas"); in ZTEST_USER()
118 target = 6; in ZTEST_USER()
119 zassert_true(atomic_cas(&target, oldvalue, value), "atomic_cas"); in ZTEST_USER()
120 zassert_true((target == value), "atomic_cas"); in ZTEST_USER()
134 target = 1; in ZTEST_USER()
136 zassert_true((atomic_add(&target, value) == 1), "atomic_add"); in ZTEST_USER()
137 zassert_true((target == 3), "atomic_add"); in ZTEST_USER()
139 target = 2; in ZTEST_USER()
141 zassert_true((atomic_add(&target, value) == 2), "atomic_add"); in ZTEST_USER()
142 zassert_true((target == -2), "atomic_add"); in ZTEST_USER()
145 target = 10; in ZTEST_USER()
147 zassert_true((atomic_sub(&target, value) == 10), "atomic_sub"); in ZTEST_USER()
148 zassert_true((target == 8), "atomic_sub"); in ZTEST_USER()
150 target = 5; in ZTEST_USER()
152 zassert_true((atomic_sub(&target, value) == 5), "atomic_sub"); in ZTEST_USER()
153 zassert_true((target == 9), "atomic_sub"); in ZTEST_USER()
156 target = 5; in ZTEST_USER()
157 zassert_true((atomic_inc(&target) == 5), "atomic_inc"); in ZTEST_USER()
158 zassert_true((target == 6), "atomic_inc"); in ZTEST_USER()
161 target = 2; in ZTEST_USER()
162 zassert_true((atomic_dec(&target) == 2), "atomic_dec"); in ZTEST_USER()
163 zassert_true((target == 1), "atomic_dec"); in ZTEST_USER()
166 target = 50; in ZTEST_USER()
167 zassert_true((atomic_get(&target) == 50), "atomic_get"); in ZTEST_USER()
175 target = 42; in ZTEST_USER()
177 zassert_true((atomic_set(&target, value) == 42), "atomic_set"); in ZTEST_USER()
178 zassert_true((target == value), "atomic_set"); in ZTEST_USER()
188 target = 100; in ZTEST_USER()
189 zassert_true((atomic_clear(&target) == 100), "atomic_clear"); in ZTEST_USER()
190 zassert_true((target == 0), "atomic_clear"); in ZTEST_USER()
199 target = 0xFF00; in ZTEST_USER()
201 zassert_true((atomic_or(&target, value) == 0xFF00), "atomic_or"); in ZTEST_USER()
202 zassert_true((target == 0xFF0F), "atomic_or"); in ZTEST_USER()
205 target = 0xFF00; in ZTEST_USER()
207 zassert_true((atomic_xor(&target, value) == 0xFF00), "atomic_xor"); in ZTEST_USER()
208 zassert_true((target == 0xF00F), "atomic_xor"); in ZTEST_USER()
211 target = 0xFF00; in ZTEST_USER()
213 zassert_true((atomic_and(&target, value) == 0xFF00), "atomic_and"); in ZTEST_USER()
214 zassert_true((target == 0x0F00), "atomic_and"); in ZTEST_USER()
218 target = 0xFF00; in ZTEST_USER()
220 zassert_true((atomic_nand(&target, value) == 0xFF00), "atomic_nand"); in ZTEST_USER()
221 zassert_true((target == ATOMIC_WORD(0xFFFFFFFFFFFFF0FF, 0xFFFFF0FF)), "atomic_nand"); in ZTEST_USER()
225 target = ATOMIC_WORD(0x0F0F0F0F0F0F0F0F, 0x0F0F0F0F); in ZTEST_USER()
226 zassert_true(!!(atomic_test_bit(&target, i) == !!(target & BIT(i))), in ZTEST_USER()
233 target = orig; in ZTEST_USER()
234 zassert_true(!!(atomic_test_and_clear_bit(&target, i)) == !!(orig & BIT(i)), in ZTEST_USER()
236 zassert_true(target == (orig & ~BIT(i)), "atomic_test_and_clear_bit"); in ZTEST_USER()
242 target = orig; in ZTEST_USER()
243 zassert_true(!!(atomic_test_and_set_bit(&target, i)) == !!(orig & BIT(i)), in ZTEST_USER()
245 zassert_true(target == (orig | BIT(i)), "atomic_test_and_set_bit"); in ZTEST_USER()
251 target = orig; in ZTEST_USER()
252 atomic_clear_bit(&target, i); in ZTEST_USER()
253 zassert_true(target == (orig & ~BIT(i)), "atomic_clear_bit"); in ZTEST_USER()
259 target = orig; in ZTEST_USER()
260 atomic_set_bit(&target, i); in ZTEST_USER()
261 zassert_true(target == (orig | BIT(i)), "atomic_set_bit"); in ZTEST_USER()
267 target = orig; in ZTEST_USER()
268 atomic_set_bit_to(&target, i, false); in ZTEST_USER()
269 zassert_true(target == (orig & ~BIT(i)), "atomic_set_bit_to"); in ZTEST_USER()
275 target = orig; in ZTEST_USER()
276 atomic_set_bit_to(&target, i, true); in ZTEST_USER()
277 zassert_true(target == (orig | BIT(i)), "atomic_set_bit_to"); in ZTEST_USER()