Commit 7bdf41ad authored by Ivan Orlov's avatar Ivan Orlov Committed by Anup Patel
Browse files

lib: tests: Add test for atomic_t



Implement the test which covers some of the functions from the
`riscv_atomic.h` header file. The test contains 9 test cases:

1) atomic read/write test
2) add/return test
3) sub/return test
4) cmpxchg test
5) atomic_xchg test
6) atomic_raw_set_bit test
7) atomic_raw_clear_bit test
8) atomic_set_bit test
9) atomic_clear_bit test

Some of the test cases operate on the `test_atomic` variable. It gets
initialized in the suite init function.

Signed-off-by: default avatarIvan Orlov <ivan.orlov0322@gmail.com>
Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
parent f6243d9c
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment