Lines Matching refs:fd
36 struct fd { struct
43 static inline void fdput(struct fd fd) in fdput() argument
45 if (fd.flags & FDPUT_FPUT) in fdput()
46 fput(fd.file); in fdput()
49 extern struct file *fget(unsigned int fd);
50 extern struct file *fget_raw(unsigned int fd);
51 extern struct file *fget_task(struct task_struct *task, unsigned int fd);
52 extern unsigned long __fdget(unsigned int fd);
53 extern unsigned long __fdget_raw(unsigned int fd);
54 extern unsigned long __fdget_pos(unsigned int fd);
57 static inline struct fd __to_fd(unsigned long v) in __to_fd()
59 return (struct fd){(struct file *)(v & ~3),v & 3}; in __to_fd()
62 static inline struct fd fdget(unsigned int fd) in fdget() argument
64 return __to_fd(__fdget(fd)); in fdget()
67 static inline struct fd fdget_raw(unsigned int fd) in fdget_raw() argument
69 return __to_fd(__fdget_raw(fd)); in fdget_raw()
72 static inline struct fd fdget_pos(int fd) in fdget_pos() argument
74 return __to_fd(__fdget_pos(fd)); in fdget_pos()
77 static inline void fdput_pos(struct fd f) in fdput_pos()
84 DEFINE_CLASS(fd, struct fd, fdput(_T), fdget(fd), int fd)
87 extern int replace_fd(unsigned fd, struct file *file, unsigned flags);
88 extern void set_close_on_exec(unsigned int fd, int flag);
89 extern bool get_close_on_exec(unsigned int fd);
92 extern void put_unused_fd(unsigned int fd);
97 extern void fd_install(unsigned int fd, struct file *file);