fs/lock: prefer nxsched_self for modularity

Use of nxsched_self() is preferred from outside of the sched/ folder.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This commit is contained in:
Yanfeng Liu 2024-06-09 14:31:13 +08:00 committed by Xiang Xiao
parent b53b449847
commit ce0c98f0fd
1 changed files with 1 additions and 2 deletions

View File

@ -36,7 +36,6 @@
#include <nuttx/list.h>
#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). */