summaryrefslogtreecommitdiff
path: root/include/sbi/riscv_atomic.h
AgeCommit message (Collapse)AuthorFilesLines
2023-12-08lib: sbi: Fix __atomic_op_bit_ord and commentsXiang W1-4/+4
The original code returns the value of the word before modification. When modifying the upper 32 bits under RV64, the value returned via int return will have no meaning. Corrected to return the value of the bit. And modify the function description. Signed-off-by: Xiang W <wxjstz@126.com> Reviewed-by: Anup Patel <anup@brainfault.org>
2020-03-28include: Use more consistent name for atomic xchg() and cmpxchg()Anup Patel1-2/+2
We should remove the "arch_" prefix from atomic xchg() and cmpxchg() function names to have consistent naming of all atomic functions. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
2019-08-16lib: Provide an atomic exchange function unsigned longAtish Patra1-0/+3
Signed-off-by: Anup Patel <anup.patel@wdc.com> Signed-off-by: Atish Patra <atish.patra@wdc.com>
2019-04-24all: run clang-format and update checked-in filesOlof Johansson1-4/+5
Noisy commit, no functional changes. Generated with an current upstream clang-format and: clang-format -i $(find . -name \*.[ch]) Signed-off-by: Olof Johansson <olof@lixom.net>
2019-01-24all: Update copyright header in all filesAnup patel1-3/+3
This patch updates copyright header in all files as follows: 1. Makes "SPDX-License-Identifier: BSD-2-Clause" as first line 2. Change copyright year to 2019 for Western Digital Signed-off-by: Anup Patel <anup.patel@wdc.com>
2019-01-22lib: Add atomic bit set/clear operations.Atish Patra1-0/+28
Add addtional functionlities for set/clear bits atomically. Signed-off-by: Atish Patra <atish.patra@wdc.com>
2018-12-11Initial commit.Anup Patel1-0/+38
Signed-off-by: Anup Patel <anup.patel@wdc.com>