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

Function dfs_fdtable_get_pid

components/dfs/dfs_v1/src/dfs.c:908–922  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

906
907#ifdef RT_USING_SMART
908struct dfs_fdtable *dfs_fdtable_get_pid(int pid)
909{
910 struct rt_lwp *lwp = RT_NULL;
911 struct dfs_fdtable *fdt = RT_NULL;
912
913 lwp_pid_lock_take();
914 lwp = lwp_from_pid_locked(pid);
915 if (lwp)
916 {
917 fdt = &lwp->fdt;
918 }
919 lwp_pid_lock_release();
920
921 return fdt;
922}
923#endif
924
925struct dfs_fdtable *dfs_fdtable_get_global(void)

Callers 1

lsofpFunction · 0.85

Calls 3

lwp_pid_lock_takeFunction · 0.85
lwp_from_pid_lockedFunction · 0.85
lwp_pid_lock_releaseFunction · 0.85

Tested by

no test coverage detected