mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 13:13:08 +08:00
fs/inode: improve the performance of get file pointer
Remove file locks and enter critical sections to protect file lists Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
+114
-161
File diff suppressed because it is too large
Load Diff
@@ -37,6 +37,7 @@
|
||||
|
||||
#include <nuttx/mutex.h>
|
||||
#include <nuttx/semaphore.h>
|
||||
#include <nuttx/spinlock.h>
|
||||
#include <nuttx/mm/map.h>
|
||||
|
||||
/****************************************************************************
|
||||
@@ -478,7 +479,7 @@ struct file
|
||||
|
||||
struct filelist
|
||||
{
|
||||
mutex_t fl_lock; /* Manage access to the file list */
|
||||
spinlock_t fl_lock; /* Manage access to the file list */
|
||||
uint8_t fl_rows; /* The number of rows of fl_files array */
|
||||
FAR struct file **fl_files; /* The pointer of two layer file descriptors array */
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user