RT-Thread RTOS 1.2.0
An open source embedded real-time operating system
|
函数 | |
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) |
int fdt_fd_new | ( | struct dfs_fdtable * | fdt | ) |
This function will allocate a file descriptor.
引用了 DFS_FD_MAGIC, dfs_file_lock(), dfs_file_unlock(), DFS_STDIO_OFFSET, dfs_fdtable::fds, LOG_D, LOG_E, dfs_file::magic, dfs_file::pos_lock, dfs_file::ref_count, rt_calloc(), RT_IPC_FLAG_PRIO, rt_mutex_init() , 以及 RT_NULL.
struct dfs_file * fdt_get_file | ( | struct dfs_fdtable * | fdt, |
int | fd ) |
This function will return a file descriptor structure according to file descriptor.
引用了 DFS_FD_MAGIC, dfs_fdtable::fds, dfs_file::magic , 以及 dfs_fdtable::maxfd.
void fd_release | ( | int | fd | ) |
This function will put the file descriptor.
引用了 dfs_fdtable_get() , 以及 fdt_fd_release().