mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 02:36:11 +08:00
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:
committed by
Alin Jerpelea
parent
eed302b8bb
commit
dcea1b90e7
+1
-1
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user