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

Function dfs_fdtable_get

components/dfs/dfs_v2/src/dfs.c:499–520  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

497 * This function will get the file descriptor table of current process.
498 */
499struct dfs_fdtable *dfs_fdtable_get(void)
500{
501 struct dfs_fdtable *fdt;
502#ifdef RT_USING_SMART
503 struct rt_lwp *lwp = NULL;
504 rt_thread_t thread = rt_thread_self();
505
506 if (thread)
507 {
508 lwp = (struct rt_lwp *)thread->lwp;
509 }
510
511 if (lwp)
512 fdt = &lwp->fdt;
513 else
514 fdt = &_fdtab;
515#else
516 fdt = &_fdtab;
517#endif
518
519 return fdt;
520}
521
522#ifdef RT_USING_SMART
523/**

Callers 8

fd_newFunction · 0.70
fd_releaseFunction · 0.70
fd_getFunction · 0.70
dfs_dupFunction · 0.70
dfs_dup_toFunction · 0.70
sys_dupFunction · 0.70
sys_dup2Function · 0.70
list_fdFunction · 0.70

Calls 1

rt_thread_selfFunction · 0.85

Tested by

no test coverage detected