Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\atomic64_test.c Create Date:2022-07-28 07:17:39
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:test_atomic

Proto:static __init void test_atomic(void)

Type:void

Parameter:Nothing

106  v0 = 0xaaa31337
107  v1 = 0xdeadbeef
108  onestwos = 0x11112222
109  one = 1
114  TEST(, add, += , onestwos)
115  TEST(, add, += , - one)
116  TEST(, sub, -= , onestwos)
117  TEST(, sub, -= , - one)
118  TEST(, or, |= , v1)
119  TEST(, and, &= , v1)
120  TEST(, xor, ^= , v1)
121  TEST(, andnot, &= ~, v1)
123  RETURN_FAMILY_TEST(, add_return, += , onestwos)
124  RETURN_FAMILY_TEST(, add_return, += , - one)
125  RETURN_FAMILY_TEST(, sub_return, -= , onestwos)
126  RETURN_FAMILY_TEST(, sub_return, -= , - one)
128  FETCH_FAMILY_TEST(, fetch_add, += , onestwos)
129  FETCH_FAMILY_TEST(, fetch_add, += , - one)
130  FETCH_FAMILY_TEST(, fetch_sub, -= , onestwos)
131  FETCH_FAMILY_TEST(, fetch_sub, -= , - one)
133  FETCH_FAMILY_TEST(, fetch_or, |= , v1)
134  FETCH_FAMILY_TEST(, fetch_and, &= , v1)
135  FETCH_FAMILY_TEST(, fetch_andnot, &= ~, v1)
136  FETCH_FAMILY_TEST(, fetch_xor, ^= , v1)
138  INC_RETURN_FAMILY_TEST(, v0)
139  DEC_RETURN_FAMILY_TEST(, v0)
141  XCHG_FAMILY_TEST(, v0, v1)
142  CMPXCHG_FAMILY_TEST(, v0, v1, onestwos)
Caller
NameDescribe
test_atomics_init