Lines Matching defs:new_fdt
675 static void copy_fds(const struct fd_table_s *new_fdt, const struct fd_table_s *old_fdt)
679 sz = new_fdt->max_fds * sizeof(struct file_table_s);
682 (void)memcpy_s(new_fdt->ft_fds, sz, old_fdt->ft_fds, sz);
684 (void)memcpy_s(new_fdt->proc_fds, sizeof(fd_set), old_fdt->proc_fds, sizeof(fd_set));
685 (void)memcpy_s(new_fdt->cloexec_fds, sizeof(fd_set), old_fdt->cloexec_fds, sizeof(fd_set));
688 static void copy_fd_table(struct fd_table_s *new_fdt, struct fd_table_s *old_fdt)
690 copy_fds((const struct fd_table_s *)new_fdt, (const struct fd_table_s *)old_fdt);
691 for (int i = 0; i < new_fdt->max_fds; i++)
693 if (FD_ISSET(i, new_fdt->proc_fds))
712 FD_CLR(i, new_fdt->proc_fds);
713 new_fdt->ft_fds[i].sysFd = -1;
815 struct fd_table_s *new_fdt = NULL;
836 new_fdt = alloc_fd_table(old_fdt->max_fds);
837 if(new_fdt == NULL)
843 copy_fd_table(new_fdt, old_fdt);
844 files->fdt = new_fdt;
905 struct fd_table_s *new_fdt = NULL;
926 new_fdt = alloc_fd_table(old_fdt->max_fds);
927 if (new_fdt == NULL)
933 copy_fds((const struct fd_table_s *)new_fdt, (const struct fd_table_s *)old_fdt);
934 files->fdt = new_fdt;