* This function will get the file descriptor table of current process. */
| 887 | * This function will get the file descriptor table of current process. |
| 888 | */ |
| 889 | struct 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 |
| 908 | struct dfs_fdtable *dfs_fdtable_get_pid(int pid) |
no test coverage detected