Lines Matching refs:fd
35 struct fd { struct
42 static inline void fdput(struct fd fd) in fdput() argument
44 if (fd.flags & FDPUT_FPUT) in fdput()
45 fput(fd.file); in fdput()
48 extern struct file *fget(unsigned int fd);
49 extern struct file *fget_raw(unsigned int fd);
50 extern struct file *fget_task(struct task_struct *task, unsigned int fd);
51 extern unsigned long __fdget(unsigned int fd);
52 extern unsigned long __fdget_raw(unsigned int fd);
53 extern unsigned long __fdget_pos(unsigned int fd);
56 static inline struct fd __to_fd(unsigned long v) in __to_fd()
58 return (struct fd){(struct file *)(v & ~3),v & 3}; in __to_fd()
61 static inline struct fd fdget(unsigned int fd) in fdget() argument
63 return __to_fd(__fdget(fd)); in fdget()
66 static inline struct fd fdget_raw(unsigned int fd) in fdget_raw() argument
68 return __to_fd(__fdget_raw(fd)); in fdget_raw()
71 static inline struct fd fdget_pos(int fd) in fdget_pos() argument
73 return __to_fd(__fdget_pos(fd)); in fdget_pos()
76 static inline void fdput_pos(struct fd f) in fdput_pos()
84 extern int replace_fd(unsigned fd, struct file *file, unsigned flags);
85 extern void set_close_on_exec(unsigned int fd, int flag);
86 extern bool get_close_on_exec(unsigned int fd);
89 extern void put_unused_fd(unsigned int fd);
91 extern void fd_install(unsigned int fd, struct file *file);