MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / dfs_fdtable_get

Function dfs_fdtable_get

components/dfs/dfs_v1/src/dfs.c:889–905  ·  view source on GitHub ↗

* This function will get the file descriptor table of current process. */

Source from the content-addressed store, hash-verified

887 * This function will get the file descriptor table of current process.
888 */
889struct dfs_fdtable *dfs_fdtable_get(void)
890{
891 struct dfs_fdtable *fdt;
892#ifdef RT_USING_SMART
893 struct rt_lwp *lwp;
894
895 lwp = (struct rt_lwp *)rt_thread_self()->lwp;
896 if (lwp)
897 fdt = &lwp->fdt;
898 else
899 fdt = &_fdtab;
900#else
901 fdt = &_fdtab;
902#endif
903
904 return fdt;
905}
906
907#ifdef RT_USING_SMART
908struct dfs_fdtable *dfs_fdtable_get_pid(int pid)

Callers 13

fd_newFunction · 0.70
fd_getFunction · 0.70
fd_releaseFunction · 0.70
sys_dupFunction · 0.70
fd_is_openFunction · 0.70
sys_dup2Function · 0.70
fd_get_fd_indexFunction · 0.70
list_fdFunction · 0.70
lsofpFunction · 0.70
lwp_fd_newFunction · 0.50
lwp_fd_getFunction · 0.50
lwp_fd_releaseFunction · 0.50

Calls 1

rt_thread_selfFunction · 0.85

Tested by

no test coverage detected