Lines Matching refs:fd
28 void set_close_on_exec(unsigned int fd, int flag) in set_close_on_exec() argument
35 FD_SET(fd, fdt->close_on_exec); in set_close_on_exec()
37 FD_CLR(fd, fdt->close_on_exec); in set_close_on_exec()
41 static int get_close_on_exec(unsigned int fd) in get_close_on_exec() argument
48 res = FD_ISSET(fd, fdt->close_on_exec); in get_close_on_exec()
92 tofree = fdt->fd[newfd]; in SYSCALL_DEFINE3()
96 rcu_assign_pointer(fdt->fd[newfd], file); in SYSCALL_DEFINE3()
146 static int setfl(int fd, struct file * filp, unsigned long arg) in setfl() argument
186 error = filp->f_op->fasync(fd, filp, (arg & FASYNC) != 0); in setfl()
262 static long do_fcntl(int fd, unsigned int cmd, unsigned long arg, in do_fcntl() argument
279 err = get_close_on_exec(fd) ? FD_CLOEXEC : 0; in do_fcntl()
283 set_close_on_exec(fd, arg & FD_CLOEXEC); in do_fcntl()
289 err = setfl(fd, filp, arg); in do_fcntl()
296 err = fcntl_setlk(fd, filp, cmd, (struct flock __user *) arg); in do_fcntl()
327 err = fcntl_setlease(fd, filp, arg); in do_fcntl()
330 err = fcntl_dirnotify(fd, filp, arg); in do_fcntl()
338 SYSCALL_DEFINE3(fcntl, unsigned int, fd, unsigned int, cmd, unsigned long, arg) in SYSCALL_DEFINE3() argument
343 filp = fget(fd); in SYSCALL_DEFINE3()
353 err = do_fcntl(fd, cmd, arg, filp); in SYSCALL_DEFINE3()
361 SYSCALL_DEFINE3(fcntl64, unsigned int, fd, unsigned int, cmd, in SYSCALL_DEFINE3() argument
368 filp = fget(fd); in SYSCALL_DEFINE3()
385 err = fcntl_setlk64(fd, filp, cmd, in SYSCALL_DEFINE3()
389 err = do_fcntl(fd, cmd, arg, filp); in SYSCALL_DEFINE3()
427 int fd, in send_sigio_to_task() argument
453 si.si_fd = fd; in send_sigio_to_task()
462 void send_sigio(struct fown_struct *fown, int fd, int band) in send_sigio() argument
476 send_sigio_to_task(p, fown, fd, band); in send_sigio()
523 int fasync_helper(int fd, struct file * filp, int on, struct fasync_struct **fapp) in fasync_helper() argument
538 fa->fa_fd = fd; in fasync_helper()
552 new->fa_fd = fd; in fasync_helper()