fs: enhance dup3() mulit-threads saftey

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd
2023-12-13 23:09:22 +08:00
committed by Xiang Xiao
parent 60b25556d4
commit e1cd082c29
4 changed files with 95 additions and 65 deletions
+19
View File
@@ -1132,6 +1132,25 @@ int fs_getfilep(int fd, FAR struct file **filep);
int file_close(FAR struct file *filep);
/****************************************************************************
* Name: file_close_without_clear
*
* Description:
* Close a file that was previously opened with file_open(), but without
* clear filep.
*
* Input Parameters:
* filep - A pointer to a user provided memory location containing the
* open file data returned by file_open().
*
* Returned Value:
* Zero (OK) is returned on success; A negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/
int file_close_without_clear(FAR struct file *filep);
/****************************************************************************
* Name: nx_close_from_tcb
*