RT-Thread RTOS  1.2.0
An open source embedded real-time operating system
+ Collaboration diagram for File Descriptor:

Functions

int fdt_fd_new (struct dfs_fdtable *fdt)
 
struct dfs_file * fdt_get_file (struct dfs_fdtable *fdt, int fd)
 
void fd_release (int fd)
 

Detailed Description

Function Documentation

◆ fdt_fd_new()

int fdt_fd_new ( struct dfs_fdtable *  fdt)

This function will allocate a file descriptor.

Returns
-1 on failed or the allocated file descriptor.

◆ fdt_get_file()

struct dfs_file* fdt_get_file ( struct dfs_fdtable *  fdt,
int  fd 
)

This function will return a file descriptor structure according to file descriptor.

Returns
NULL on on this file descriptor or the file descriptor structure pointer.

◆ fd_release()

void fd_release ( int  fd)

This function will put the file descriptor.