Lines Matching refs:fd
34 struct fd { struct
41 static inline void fdput(struct fd fd) in fdput() argument
43 if (fd.flags & FDPUT_FPUT) in fdput()
44 fput(fd.file); in fdput()
47 extern struct file *fget(unsigned int fd);
48 extern struct file *fget_many(unsigned int fd, unsigned int refs);
49 extern struct file *fget_raw(unsigned int fd);
50 extern unsigned long __fdget(unsigned int fd);
51 extern unsigned long __fdget_raw(unsigned int fd);
52 extern unsigned long __fdget_pos(unsigned int fd);
55 static inline struct fd __to_fd(unsigned long v) in __to_fd()
57 return (struct fd){(struct file *)(v & ~3),v & 3}; in __to_fd()
60 static inline struct fd fdget(unsigned int fd) in fdget() argument
62 return __to_fd(__fdget(fd)); in fdget()
65 static inline struct fd fdget_raw(unsigned int fd) in fdget_raw() argument
67 return __to_fd(__fdget_raw(fd)); in fdget_raw()
70 static inline struct fd fdget_pos(int fd) in fdget_pos() argument
72 return __to_fd(__fdget_pos(fd)); in fdget_pos()
75 static inline void fdput_pos(struct fd f) in fdput_pos()
83 extern int replace_fd(unsigned fd, struct file *file, unsigned flags);
84 extern void set_close_on_exec(unsigned int fd, int flag);
85 extern bool get_close_on_exec(unsigned int fd);
87 extern void put_unused_fd(unsigned int fd);
89 extern void fd_install(unsigned int fd, struct file *file);