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_many(unsigned int fd, unsigned int refs);
51 extern struct file *fget_raw(unsigned int fd);
52 extern struct file *fget_task(struct task_struct *task, unsigned int fd);
53 extern unsigned long __fdget(unsigned int fd);
54 extern unsigned long __fdget_raw(unsigned int fd);
55 extern unsigned long __fdget_pos(unsigned int fd);
58 static inline struct fd __to_fd(unsigned long v) in __to_fd()
60 return (struct fd){(struct file *)(v & ~3),v & 3}; in __to_fd()
63 static inline struct fd fdget(unsigned int fd) in fdget() argument
65 return __to_fd(__fdget(fd)); in fdget()
68 static inline struct fd fdget_raw(unsigned int fd) in fdget_raw() argument
70 return __to_fd(__fdget_raw(fd)); in fdget_raw()
73 static inline struct fd fdget_pos(int fd) in fdget_pos() argument
75 return __to_fd(__fdget_pos(fd)); in fdget_pos()
78 static inline void fdput_pos(struct fd f) in fdput_pos()
86 extern int replace_fd(unsigned fd, struct file *file, unsigned flags);
87 extern void set_close_on_exec(unsigned int fd, int flag);
88 extern bool get_close_on_exec(unsigned int fd);
91 extern void put_unused_fd(unsigned int fd);
93 extern void fd_install(unsigned int fd, struct file *file);
95 extern int __receive_fd(int fd, struct file *file, int __user *ufd,
108 static inline int receive_fd_replace(int fd, struct file *file, unsigned int o_flags) in receive_fd_replace() argument
110 return __receive_fd(fd, file, NULL, o_flags); in receive_fd_replace()