函数逻辑报告 |
Source Code:lib\atomic64_test.c |
Create Date:2022-07-27 08:16:14 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:test_atomic64
函数原型:static __init void test_atomic64(void)
返回类型:void
参数:无
149 | v0等于0xaaa31337c001d00dLL |
150 | v1等于0xdeadbeefdeafcafeLL |
151 | v2等于0xfaceabadf00df001LL |
152 | v3等于0x8000000000000000LL |
153 | onestwos等于0x1111111122222222LL |
154 | one等于1LL |
157 | v等于ATOMIC64_INIT(v0) |
161 | atomic64_set( & v, v1) |
164 | BUG_ON(atomic64_read( & v) != r) |
175 | RETURN_FAMILY_TEST(64, add_return, += , onestwos) |
176 | RETURN_FAMILY_TEST(64, add_return, += , - one) |
177 | RETURN_FAMILY_TEST(64, sub_return, -= , onestwos) |
178 | RETURN_FAMILY_TEST(64, sub_return, -= , - one) |
180 | FETCH_FAMILY_TEST(64, fetch_add, += , onestwos) |
181 | FETCH_FAMILY_TEST(64, fetch_add, += , - one) |
182 | FETCH_FAMILY_TEST(64, fetch_sub, -= , onestwos) |
183 | FETCH_FAMILY_TEST(64, fetch_sub, -= , - one) |
185 | FETCH_FAMILY_TEST(64, fetch_or, |= , v1) |
186 | FETCH_FAMILY_TEST(64, fetch_and, &= , v1) |
187 | FETCH_FAMILY_TEST(64, fetch_andnot, &= ~, v1) |
188 | FETCH_FAMILY_TEST(64, fetch_xor, ^= , v1) |
191 | atomic64_inc( & v) |
196 | atomic64_dec( & v) |
200 | INC_RETURN_FAMILY_TEST(64, v0) |
201 | DEC_RETURN_FAMILY_TEST(64, v0) |
203 | XCHG_FAMILY_TEST(64, v0, v1) |
204 | CMPXCHG_FAMILY_TEST(64, v0, v1, v2) |
216 | BUG_ON(atomic64_dec_if_positive( & v) != (onestwos - 1)) |
220 | INIT(0) |
221 | BUG_ON(atomic64_dec_if_positive( & v) != - one) |
225 | BUG_ON(atomic64_dec_if_positive( & v) != ( - one - one)) |
229 | BUG_ON(!atomic64_inc_not_zero( & v)) |
233 | INIT(0) |
234 | BUG_ON(atomic64_inc_not_zero( & v)) |
238 | BUG_ON(!atomic64_inc_not_zero( & v)) |
244 | r_int等于atomic64_inc_not_zero( & v) |
名称 | 描述 |
---|---|
test_atomics_init |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |