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:
parent
b53b449847
commit
ce0c98f0fd
|
@ -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). */
|
||||
|
||||
|
|
Loading…
Reference in New Issue