Revert "sched: replace some global variables to macro"

sched implementation not depends on macro abstraction, so revert below commit:

This reverts commit 4e62d0005a
This reverts commit 0f0c370520
This reverts commit ad0efd04ee

Signed-off-by: chao an <anchao@lixiang.com>
This commit is contained in:
chao an
2024-06-06 16:49:50 +08:00
committed by Xiang Xiao
parent f4d9005bea
commit e456c88c09
22 changed files with 87 additions and 103 deletions
+2 -2
View File
@@ -187,7 +187,7 @@ int foreach_inode(foreach_inode_t handler, FAR void *arg)
ret = inode_lock();
if (ret >= 0)
{
ret = foreach_inodelevel(inode_root()->i_child, info);
ret = foreach_inodelevel(g_root_inode->i_child, info);
inode_unlock();
}
@@ -211,7 +211,7 @@ int foreach_inode(foreach_inode_t handler, FAR void *arg)
ret = inode_lock();
if (ret >= 0)
{
ret = foreach_inodelevel(inode_root()->i_child, &info);
ret = foreach_inodelevel(g_root_inode->i_child, &info);
inode_unlock();
}
+1 -1
View File
@@ -141,7 +141,7 @@ static void inode_insert(FAR struct inode *node,
void inode_root_reserve(void)
{
inode_root() = inode_alloc("", 0777);
g_root_inode = inode_alloc("", 0777);
}
/****************************************************************************
+1 -1
View File
@@ -214,7 +214,7 @@ static int _inode_linktarget(FAR struct inode *node,
static int _inode_search(FAR struct inode_search_s *desc)
{
FAR const char *name;
FAR struct inode *node = inode_root();
FAR struct inode *node = g_root_inode;
FAR struct inode *left = NULL;
FAR struct inode *above = NULL;
FAR const char *relpath = NULL;
-2
View File
@@ -65,8 +65,6 @@
} \
while (0)
#define inode_root() g_root_inode
/****************************************************************************
* Public Types
****************************************************************************/