Lines Matching defs:fd1
87 static inline int sync_merge(const char *name, int fd1, int fd2)
99 ret = ioctl(fd1, SYNC_IOC_MERGE, &data);
108 /* accumulate fd2 into fd1. If *fd1 is not a valid fd then dup fd2,
109 * otherwise sync_merge() and close the old *fd1. This can be used
125 static inline int sync_accumulate(const char *name, int *fd1, int fd2)
131 if (*fd1 < 0) {
132 *fd1 = dup(fd2);
136 ret = sync_merge(name, *fd1, fd2);
138 /* leave *fd1 as it is */
142 close(*fd1);
143 *fd1 = ret;