Lines Matching defs:fd
19 * The default fd array needs to be at least BITS_PER_LONG,
26 struct file __rcu **fd; /* current fd array */
33 static inline void __set_close_on_exec(int fd, struct fdtable *fdt)
35 __set_bit(fd, fdt->close_on_exec);
38 static inline void __clear_close_on_exec(int fd, struct fdtable *fdt)
40 __clear_bit(fd, fdt->close_on_exec);
43 static inline bool close_on_exec(int fd, const struct fdtable *fdt)
45 return test_bit(fd, fdt->close_on_exec);
48 static inline void __set_open_fd(int fd, struct fdtable *fdt)
50 __set_bit(fd, fdt->open_fds);
53 static inline void __clear_open_fd(int fd, struct fdtable *fdt)
55 __clear_bit(fd, fdt->open_fds);
58 static inline bool fd_is_open(int fd, const struct fdtable *fdt)
60 return test_bit(fd, fdt->open_fds);
105 static inline struct file * fcheck_files(struct files_struct *files, unsigned int fd)
110 if (fd < fdt->max_fds)
111 file = rcu_dereference_check_fdtable(files, fdt->fd[fd]);
116 * Check whether the specified fd has an open file.
118 #define fcheck(fd) fcheck_files(current->files, fd)