diff options
| author | a1012112796 <[email protected]> | 2022-11-10 08:22:41 +0800 |
|---|---|---|
| committer | Man, Jianting (Meco) <[email protected]> | 2022-11-09 22:41:15 -0500 |
| commit | 5370d4da508ea17d9025b8e5d12a59f24cb91e55 (patch) | |
| tree | d2fe4510b6c55a0faa2ed78d40b6b3d35a6fffcb | |
| parent | f57eb4feb5ee4856299058058eff15593ac0570d (diff) | |
replace `rt_enter_critical` with `dfs_lock` for list_fd
I found that if use mutex in `rt_kprintf`,
the `rt_enter_critical` will create a assert
error later. after chehcking,I found all
operation with fd_table has using
`dfs_lock/unlock` to protect. so I think
using `dfs_lock` is enough. thanks.
Signed-off-by: a1012112796 <[email protected]>
| -rw-r--r-- | components/dfs/src/dfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/dfs/src/dfs.c b/components/dfs/src/dfs.c index 5c542fdc9b..284a662812 100644 --- a/components/dfs/src/dfs.c +++ b/components/dfs/src/dfs.c @@ -529,7 +529,7 @@ int list_fd(void) fd_table = dfs_fdtable_get(); if (!fd_table) return -1; - rt_enter_critical(); + dfs_lock(); rt_kprintf("fd type ref magic path\n"); rt_kprintf("-- ------ --- ----- ------\n"); @@ -562,7 +562,7 @@ int list_fd(void) } } } - rt_exit_critical(); + dfs_unlock(); return 0; } |
