From ce0c98f0fd24422af4f9acef1318eca9ac56efd7 Mon Sep 17 00:00:00 2001 From: Yanfeng Liu Date: Sun, 9 Jun 2024 14:31:13 +0800 Subject: [PATCH] fs/lock: prefer nxsched_self for modularity Use of nxsched_self() is preferred from outside of the sched/ folder. Signed-off-by: Yanfeng Liu --- fs/vfs/fs_lock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/vfs/fs_lock.c b/fs/vfs/fs_lock.c index 333653a270..f92b5d1c1a 100644 --- a/fs/vfs/fs_lock.c +++ b/fs/vfs/fs_lock.c @@ -36,7 +36,6 @@ #include #include "lock.h" -#include "sched/sched.h" /**************************************************************************** * Pre-processor Definitions @@ -95,7 +94,7 @@ static mutex_t g_protect_lock = NXMUTEX_INITIALIZER; static int file_lock_get_path(FAR struct file *filep, FAR char *path) { - FAR struct tcb_s *tcb = this_task(); + FAR struct tcb_s *tcb = nxsched_self(); /* We only apply file lock on mount points (f_inode won't be NULL). */