/linux-master/arch/um/drivers/ |
H A D | slip.h | 18 extern int slip_user_read(int fd, void *buf, int len, struct slip_data *pri); 19 extern int slip_user_write(int fd, void *buf, int len, struct slip_data *pri);
|
H A D | daemon.h | 19 int fd; member in struct:daemon_data 26 extern int daemon_user_write(int fd, void *buf, int len,
|
H A D | null.c | 23 int fd; local 27 fd = open(DEV_NULL, O_RDWR); 28 return (fd < 0) ? -errno : fd; 31 static int null_read(int fd, __u8 *c_out, void *unused) argument
|
H A D | fd.c | 16 int fd; member in struct:fd_chan 29 printk(UM_KERN_ERR "fd_init : channel type 'fd' must specify a " 45 *data = ((struct fd_chan) { .fd = n, 55 if (data->raw && isatty(data->fd)) { 56 CATCH_EINTR(err = tcgetattr(data->fd, &data->tt)); 60 err = raw(data->fd); 64 sprintf(data->str, "%d", data->fd); 66 return data->fd; 69 static void fd_close(int fd, void *d) argument 74 if (!data->raw || !isatty(fd)) [all...] |
H A D | port_user.c | 75 int fd, err; local 77 fd = port_wait(data->kernel_data); 78 if ((fd >= 0) && data->raw) { 79 CATCH_EINTR(err = tcgetattr(fd, &data->tt)); 83 err = raw(fd); 88 return fd; 91 static void port_close(int fd, void *d) argument 96 os_close_file(fd); 115 int fd, err, arg; local 117 fd 168 port_connection(int fd, int *socket, int *pid_out) argument [all...] |
/linux-master/include/asm-generic/ |
H A D | syscalls.h | 16 unsigned long fd, unsigned long pgoff); 22 unsigned long fd, off_t pgoff);
|
/linux-master/tools/testing/selftests/proc/ |
H A D | setns-dcache.c | 47 int fd[2]; local 65 if (pipe(fd) == -1) { 79 if (write(fd[1], &_, 1) != 1) { 88 if (read(fd[0], &_, 1) != 1) { 114 int fd; local 116 fd = open("/proc/net/unix", O_RDONLY); 117 if (fd == -1) { 122 rv = read(fd, buf, sizeof(buf));
|
H A D | setns-sysvipc.c | 46 int fd[2]; local 64 if (pipe(fd) == -1) { 78 if (write(fd[1], &_, 1) != 1) { 87 if (read(fd[0], &_, 1) != 1) { 113 int fd; local 115 fd = open("/proc/sysvipc/shm", O_RDONLY); 116 if (fd == -1) { 122 rv = read(fd, buf, sizeof(buf));
|
/linux-master/arch/um/include/shared/ |
H A D | irq_user.h | 20 extern void free_irq_by_fd(int fd); 21 extern void deactivate_fd(int fd, int irqnum);
|
H A D | os.h | 141 extern int os_stat_fd(const int fd, struct uml_stat *buf); 143 extern int os_set_exec_close(int fd); 144 extern int os_ioctl_generic(int fd, unsigned int cmd, unsigned long arg); 145 extern int os_get_ifname(int fd, char *namebuf); 146 extern int os_set_slip(int fd); 147 extern int os_mode_fd(int fd, int mode); 148 extern int os_fsync_file(int fd); 150 extern int os_seek_file(int fd, unsigned long long offset); 152 extern int os_read_file(int fd, void *buf, int len); 153 extern int os_write_file(int fd, cons [all...] |
/linux-master/tools/testing/selftests/bpf/prog_tests/ |
H A D | subprogs.c | 8 int fd; member in struct:toggler_ctx 19 lseek(ctx->fd, SEEK_SET, 0); 20 write(ctx->fd, &two, sizeof(two)); 21 lseek(ctx->fd, SEEK_SET, 0); 22 write(ctx->fd, &zero, sizeof(zero)); 35 ctx.fd = open("/proc/sys/net/core/bpf_jit_harden", O_RDWR); 36 if (!ASSERT_GE(ctx.fd, 0, "open bpf_jit_harden")) 58 close(ctx.fd);
|
H A D | log_buf.c | 154 int fd = -1; local 165 fd = bpf_prog_load(BPF_PROG_TYPE_SOCKET_FILTER, "good_prog", "GPL", 168 ASSERT_GE(fd, 0, "good_fd1"); 169 if (fd >= 0) 170 close(fd); 171 fd = -1; 176 fd = bpf_prog_load(BPF_PROG_TYPE_SOCKET_FILTER, "good_prog", "GPL", 179 ASSERT_GE(fd, 0, "good_fd2"); 180 if (fd >= 0) 181 close(fd); 206 int fd = -1; local [all...] |
H A D | bloom_filter_map.c | 13 int fd, err; local 16 fd = bpf_map_create(BPF_MAP_TYPE_BLOOM_FILTER, NULL, 4, sizeof(value), 100, NULL); 17 if (!ASSERT_LT(fd, 0, "bpf_map_create bloom filter invalid key size")) 18 close(fd); 21 fd = bpf_map_create(BPF_MAP_TYPE_BLOOM_FILTER, NULL, 0, 0, 100, NULL); 22 if (!ASSERT_LT(fd, 0, "bpf_map_create bloom filter invalid value size 0")) 23 close(fd); 26 fd = bpf_map_create(BPF_MAP_TYPE_BLOOM_FILTER, NULL, 0, INT32_MAX, 100, NULL); 27 if (!ASSERT_LT(fd, 0, "bpf_map_create bloom filter invalid value too large")) 28 close(fd); 68 int fd, err; local [all...] |
H A D | sockmap_helpers.h | 33 #define xaccept_nonblock(fd, addr, len) \ 36 accept_timeout((fd), (addr), (len), IO_TIMEOUT_SEC); \ 42 #define xbind(fd, addr, len) \ 44 int __ret = bind((fd), (addr), (len)); \ 50 #define xclose(fd) \ 52 int __ret = close((fd)); \ 58 #define xconnect(fd, addr, len) \ 60 int __ret = connect((fd), (addr), (len)); \ 66 #define xgetsockname(fd, addr, len) \ 68 int __ret = getsockname((fd), (add 182 poll_connect(int fd, unsigned int timeout_sec) argument 208 poll_read(int fd, unsigned int timeout_sec) argument 224 accept_timeout(int fd, struct sockaddr *addr, socklen_t *len, unsigned int timeout_sec) argument 233 recv_timeout(int fd, void *buf, size_t len, int flags, unsigned int timeout_sec) argument [all...] |
/linux-master/tools/thermal/lib/ |
H A D | mainloop.c | 17 int fd; member in struct:mainloop_data 47 if (md->cb(md->fd, md->data) > 0) 53 int mainloop_add(int fd, mainloop_callback_t cb, void *data) argument 67 md->fd = fd; 71 if (epoll_ctl(epfd, EPOLL_CTL_ADD, fd, &ev) < 0) { 79 int mainloop_del(int fd) argument 81 if (epoll_ctl(epfd, EPOLL_CTL_DEL, fd, NULL) < 0)
|
/linux-master/drivers/clk/ti/ |
H A D | fapll.c | 71 struct fapll_data *fd; member in struct:fapll_synth 79 static bool ti_fapll_clock_is_bypass(struct fapll_data *fd) argument 81 u32 v = readl_relaxed(fd->base); 83 if (fd->bypass_bit_inverted) 89 static void ti_fapll_set_bypass(struct fapll_data *fd) argument 91 u32 v = readl_relaxed(fd->base); 93 if (fd->bypass_bit_inverted) 97 writel_relaxed(v, fd->base); 100 static void ti_fapll_clear_bypass(struct fapll_data *fd) argument 102 u32 v = readl_relaxed(fd 111 ti_fapll_wait_lock(struct fapll_data *fd) argument 133 struct fapll_data *fd = to_fapll(hw); local 145 struct fapll_data *fd = to_fapll(hw); local 154 struct fapll_data *fd = to_fapll(hw); local 163 struct fapll_data *fd = to_fapll(hw); local 186 struct fapll_data *fd = to_fapll(hw); local 240 struct fapll_data *fd = to_fapll(hw); local 406 struct fapll_data *fd = synth->fd; local 440 struct fapll_data *fd = synth->fd; local 484 ti_fapll_synth_setup(struct fapll_data *fd, void __iomem *freq, void __iomem *div, int index, const char *name, const char *parent, struct clk *pll_clk) argument 534 struct fapll_data *fd; local [all...] |
/linux-master/fs/hfsplus/ |
H A D | attributes.c | 138 const char *name, struct hfs_find_data *fd) 150 err = hfsplus_attr_build_key(sb, fd->search_key, cnid, name); 153 err = hfs_brec_find(fd, hfs_find_rec_by_key); 157 err = hfsplus_attr_build_key(sb, fd->search_key, cnid, NULL); 160 err = hfs_brec_find(fd, hfs_find_1st_rec_by_cnid); 173 struct hfs_find_data fd; local 178 err = hfs_find_init(HFSPLUS_SB(sb)->attr_tree, &fd); 182 err = hfsplus_find_attr(sb, inode->i_ino, name, &fd); 186 hfs_find_exit(&fd); 190 hfs_find_exit(&fd); 137 hfsplus_find_attr(struct super_block *sb, u32 cnid, const char *name, struct hfs_find_data *fd) argument 199 struct hfs_find_data fd; local 266 __hfsplus_delete_attr(struct inode *inode, u32 cnid, struct hfs_find_data *fd) argument 311 struct hfs_find_data fd; local 357 struct hfs_find_data fd; local [all...] |
/linux-master/tools/perf/tests/ |
H A D | genelf.c | 29 int fd, ret; local 33 fd = mkstemp(path); 34 if (fd < 0) { 41 ret = jit_write_elf(fd, 0, "main", x86_code, sizeof(x86_code), 43 close(fd);
|
H A D | bp_signal_overflow.c | 45 static long long bp_count(int fd) argument 50 ret = read(fd, &count, sizeof(long long)); 67 int fd, i, fails = 0; local 101 fd = sys_perf_event_open(&pe, 0, -1, -1, 103 if (fd < 0) { 108 fcntl(fd, F_SETFL, O_RDWR|O_NONBLOCK|O_ASYNC); 109 fcntl(fd, F_SETSIG, SIGIO); 110 fcntl(fd, F_SETOWN, getpid()); 112 ioctl(fd, PERF_EVENT_IOC_RESET, 0); 113 ioctl(fd, PERF_EVENT_IOC_ENABL [all...] |
/linux-master/arch/um/os-Linux/ |
H A D | file.c | 43 int os_stat_fd(const int fd, struct uml_stat *ubuf) argument 48 CATCH_EINTR(err = fstat64(fd, &sbuf)); 88 int os_ioctl_generic(int fd, unsigned int cmd, unsigned long arg) argument 92 err = ioctl(fd, cmd, arg); 100 int os_get_ifname(int fd, char* namebuf) argument 102 if (ioctl(fd, SIOCGIFNAME, namebuf) < 0) 108 int os_set_slip(int fd) argument 113 if (ioctl(fd, TIOCSETD, &disc) < 0) 117 if (ioctl(fd, SIOCSIFENCAP, &sencap) < 0) 123 int os_mode_fd(int fd, in argument 181 int fd, err, f = 0; local 218 int fd, err; local 243 os_close_file(int fd) argument 247 os_fsync_file(int fd) argument 254 os_seek_file(int fd, unsigned long long offset) argument 264 os_read_file(int fd, void *buf, int len) argument 273 os_pread_file(int fd, void *buf, int len, unsigned long long offset) argument 282 os_write_file(int fd, const void *buf, int len) argument 291 os_sync_file(int fd) argument 300 os_pwrite_file(int fd, const void *buf, int len, unsigned long long offset) argument 323 int fd; local 364 os_set_exec_close(int fd) argument 404 os_set_fd_async(int fd) argument 431 os_clear_fd_async(int fd) argument 445 os_set_fd_block(int fd, int blocking) argument 464 os_accept_connection(int fd) argument 486 os_shutdown_socket(int fd, int r, int w) argument 505 os_rcv_fd(int fd, int *helper_pid_out) argument 577 os_lock_file(int fd, int excl) argument 619 os_falloc_punch(int fd, unsigned long long offset, int len) argument 628 os_falloc_zeroes(int fd, unsigned long long offset, int len) argument 639 int fd = eventfd(initval, flags); local 646 os_sendmsg_fds(int fd, const void *buf, unsigned int len, const int *fds, unsigned int fds_num) argument [all...] |
/linux-master/include/soc/fsl/ |
H A D | dpaa2-fd.h | 100 * @fd: the given frame descriptor 104 static inline dma_addr_t dpaa2_fd_get_addr(const struct dpaa2_fd *fd) argument 106 return (dma_addr_t)le64_to_cpu(fd->simple.addr); 111 * @fd: the given frame descriptor 114 static inline void dpaa2_fd_set_addr(struct dpaa2_fd *fd, dma_addr_t addr) argument 116 fd->simple.addr = cpu_to_le64(addr); 121 * @fd: the given frame descriptor 125 static inline u32 dpaa2_fd_get_frc(const struct dpaa2_fd *fd) argument 127 return le32_to_cpu(fd->simple.frc); 132 * @fd 135 dpaa2_fd_set_frc(struct dpaa2_fd *fd, u32 frc) argument 146 dpaa2_fd_get_ctrl(const struct dpaa2_fd *fd) argument 156 dpaa2_fd_set_ctrl(struct dpaa2_fd *fd, u32 ctrl) argument 167 dpaa2_fd_get_flc(const struct dpaa2_fd *fd) argument 177 dpaa2_fd_set_flc(struct dpaa2_fd *fd, dma_addr_t flc_addr) argument 182 dpaa2_fd_short_len(const struct dpaa2_fd *fd) argument 194 dpaa2_fd_get_len(const struct dpaa2_fd *fd) argument 207 dpaa2_fd_set_len(struct dpaa2_fd *fd, u32 len) argument 218 dpaa2_fd_get_offset(const struct dpaa2_fd *fd) argument 228 dpaa2_fd_set_offset(struct dpaa2_fd *fd, uint16_t offset) argument 240 dpaa2_fd_get_format( const struct dpaa2_fd *fd) argument 252 dpaa2_fd_set_format(struct dpaa2_fd *fd, enum dpaa2_fd_format format) argument 266 dpaa2_fd_get_bpid(const struct dpaa2_fd *fd) argument 276 dpaa2_fd_set_bpid(struct dpaa2_fd *fd, uint16_t bpid) argument [all...] |
/linux-master/tools/testing/selftests/timers/ |
H A D | rtcpie.c | 32 int i, fd, retval, irqcount = 0; local 42 fd = open(default_rtc, O_RDONLY); 43 if (fd == -1) { 47 close(fd); 54 fd = open(rtc, O_RDONLY); 56 if (fd == -1) { 62 retval = ioctl(fd, RTC_IRQP_READ, &old_pie_rate); 80 retval = ioctl(fd, RTC_IRQP_SET, tmp); 96 retval = ioctl(fd, RTC_PIE_ON, 0); 105 retval = read(fd, [all...] |
/linux-master/arch/arm64/kernel/ |
H A D | sys32.c | 41 COMPAT_SYSCALL_DEFINE3(aarch32_fstatfs64, unsigned int, fd, compat_size_t, sz, 48 return kcompat_sys_fstatfs64(fd, sz, buf); 57 unsigned long, fd, unsigned long, off_4k) 64 return ksys_mmap_pgoff(addr, len, prot, flags, fd, off_4k); 75 COMPAT_SYSCALL_DEFINE6(aarch32_pread64, unsigned int, fd, char __user *, buf, 78 return ksys_pread64(fd, buf, count, arg_u64(pos)); 81 COMPAT_SYSCALL_DEFINE6(aarch32_pwrite64, unsigned int, fd, 85 return ksys_pwrite64(fd, buf, count, arg_u64(pos)); 94 COMPAT_SYSCALL_DEFINE4(aarch32_ftruncate64, unsigned int, fd, u32, __pad, 97 return ksys_ftruncate(fd, arg_u6 [all...] |
/linux-master/drivers/soc/fsl/qbman/ |
H A D | qman_test_api.c | 55 static struct qm_fd fd, fd_dq; variable in typeref:struct:qm_fd 65 static void fd_init(struct qm_fd *fd) argument 67 qm_fd_addr_set64(fd, 0xabdeadbeefLLU); 68 qm_fd_set_contig_big(fd, 0x0000ffff); 69 fd->cmd = cpu_to_be32(0xfeedf00d); 72 static void fd_inc(struct qm_fd *fd) argument 74 u64 t = qm_fd_addr_get64(fd); 82 qm_fd_addr_set64(fd, t); 84 fmt = qm_fd_get_format(fd); 85 off = qm_fd_get_offset(fd); [all...] |
/linux-master/tools/power/cpupower/lib/ |
H A D | cpupower.c | 27 int fd; local 29 fd = open(path, O_RDONLY); 30 if (fd == -1) 33 numread = read(fd, buf, buflen - 1); 35 close(fd); 40 close(fd); 48 int fd; local 50 fd = open(path, O_WRONLY); 51 if (fd == -1) 54 numwritten = write(fd, bu 77 int fd; local [all...] |