mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-06-27 08:38:36 +00:00
lib: Add atomic bit set/clear operations.
Add addtional functionlities for set/clear bits atomically. Signed-off-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
parent
784a4657c0
commit
312b6bf32f
5 changed files with 179 additions and 0 deletions
|
@ -30,6 +30,7 @@
|
|||
#define LGREG __REG_SEL(3, 2)
|
||||
|
||||
#if __SIZEOF_POINTER__ == 8
|
||||
#define BITS_PER_LONG 64
|
||||
#ifdef __ASSEMBLY__
|
||||
#define RISCV_PTR .dword
|
||||
#define RISCV_SZPTR 8
|
||||
|
@ -40,6 +41,7 @@
|
|||
#define RISCV_LGPTR "3"
|
||||
#endif
|
||||
#elif __SIZEOF_POINTER__ == 4
|
||||
#define BITS_PER_LONG 32
|
||||
#ifdef __ASSEMBLY__
|
||||
#define RISCV_PTR .word
|
||||
#define RISCV_SZPTR 4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue