mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
fs: enhance dup3() mulit-threads saftey
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user