arch_atomic: only support atomic_xx and atomic64_xx function

Modify the kernel to use only atomic_xx and atomic64_xx interfaces,
avoiding the use of sizeof or typeof to determine the type of
atomic operations, thereby simplifying the kernel's atomic
interface operations.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
This commit is contained in:
zhangyuan29
2024-11-20 20:53:28 +08:00
committed by Alin Jerpelea
parent eed302b8bb
commit dcea1b90e7
34 changed files with 295 additions and 528 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ static int nxmq_file_close(FAR struct file *filep)
{
FAR struct inode *inode = filep->f_inode;
if (atomic_load(&inode->i_crefs) <= 0)
if (atomic_read(&inode->i_crefs) <= 0)
{
FAR struct mqueue_inode_s *msgq = inode->i_private;
+1 -1
View File
@@ -58,7 +58,7 @@
static void mq_inode_release(FAR struct inode *inode)
{
if (atomic_load(&inode->i_crefs) <= 1)
if (atomic_read(&inode->i_crefs) <= 1)
{
FAR struct mqueue_inode_s *msgq = inode->i_private;