Searched refs:fd (Results 1 - 25 of 1405) sorted by relevance

1234567891011>>

/linux-master/tools/testing/selftests/sync/
H A Dsw_sync.h38 int sw_sync_timeline_is_valid(int fd);
39 int sw_sync_timeline_inc(int fd, unsigned int count);
40 void sw_sync_timeline_destroy(int fd);
42 int sw_sync_fence_create(int fd, const char *name, unsigned int value);
43 int sw_sync_fence_is_valid(int fd);
44 void sw_sync_fence_destroy(int fd);
H A Dsync.h35 int sync_wait(int fd, int timeout);
37 int sync_fence_size(int fd);
38 int sync_fence_count_with_status(int fd, int status);
/linux-master/tools/testing/selftests/bpf/prog_tests/
H A Dtest_struct_ops_no_cfi.c8 int fd; local
11 fd = open("bpf_test_no_cfi.ko", O_RDONLY);
12 if (!ASSERT_GE(fd, 0, "open"))
22 err = finit_module(fd, "", 0);
23 close(fd);
/linux-master/tools/testing/selftests/memfd/
H A Dmemfd_test.c48 static ssize_t fd2name(int fd, char *buf, size_t bufsize) argument
54 size = snprintf(buf1, PATH_MAX, "/proc/self/fd/%d", fd);
56 printf("snprintf(%d) failed on %m\n", fd);
74 int r, fd; local
76 fd = sys_memfd_create(name, flags);
77 if (fd < 0) {
83 r = ftruncate(fd, sz);
89 return fd;
94 int fd local
109 int fd = open("/proc/sys/vm/memfd_noexec", O_WRONLY | O_CLOEXEC); local
126 int fd = open("/proc/sys/vm/memfd_noexec", O_RDONLY | O_CLOEXEC); local
152 int fd; local
179 mfd_assert_get_seals(int fd) argument
192 mfd_assert_has_seals(int fd, unsigned int seals) argument
205 mfd_assert_add_seals(int fd, unsigned int seals) argument
218 mfd_fail_add_seals(int fd, unsigned int seals) argument
237 mfd_assert_size(int fd, size_t size) argument
253 mfd_assert_dup(int fd) argument
266 mfd_assert_mmap_shared(int fd) argument
284 mfd_assert_mmap_private(int fd) argument
302 mfd_assert_open(int fd, int flags, mode_t mode) argument
317 mfd_fail_open(int fd, int flags, mode_t mode) argument
330 mfd_assert_read(int fd) argument
370 mfd_assert_read_shared(int fd) argument
388 mfd_assert_fork_private_write(int fd) argument
422 mfd_assert_write(int fd) argument
502 mfd_fail_write(int fd) argument
567 mfd_assert_shrink(int fd) argument
587 mfd_fail_shrink(int fd) argument
602 mfd_assert_grow(int fd) argument
626 mfd_fail_grow(int fd) argument
646 mfd_assert_grow_write(int fd) argument
670 mfd_fail_grow_write(int fd) argument
692 mfd_assert_mode(int fd, int mode) argument
711 mfd_assert_chmod(int fd, int mode) argument
725 mfd_fail_chmod(int fd, int mode) argument
821 int fd; local
870 int fd; local
922 int fd; local
948 int fd, fd2; local
988 int fd; local
1014 int fd; local
1040 int fd; local
1067 int fd; local
1117 int fd; local
1136 int fd; local
1161 int fd; local
1182 int fd; local
1219 int fd; local
1417 int fd, fd2; local
1458 int fd; local
1493 int fd, fd2; local
1535 int fd; local
[all...]
/linux-master/include/uapi/linux/
H A Dkcm.h19 int fd; member in struct:kcm_attach
24 int fd; member in struct:kcm_unattach
28 int fd; member in struct:kcm_clone
/linux-master/tools/build/feature/
H A Dtest-timerfd.c11 int fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK); local
12 if (fd < 0)
15 if (timerfd_settime(fd, 0, &new_value, NULL) != 0)
/linux-master/tools/thermal/lib/
H A Dmainloop.h6 typedef int (*mainloop_callback_t)(int fd, void *data);
9 extern int mainloop_add(int fd, mainloop_callback_t cb, void *data);
10 extern int mainloop_del(int fd);
/linux-master/tools/usb/usbip/libsrc/
H A Dsysfs_utils.c13 int fd; local
16 fd = open(attr_path, O_WRONLY);
17 if (fd < 0) {
22 length = write(fd, new_value, len);
25 close(fd);
29 close(fd);
/linux-master/tools/perf/util/
H A Dsetns.c7 int setns(int fd, int nstype) argument
9 return syscall(__NR_setns, fd, nstype);
/linux-master/tools/testing/vsock/
H A Dmsg_zerocopy_common.h15 void enable_so_zerocopy(int fd);
16 void vsock_recv_completion(int fd, const bool *zerocopied);
/linux-master/include/linux/
H A Dfile.h3 * Wrapper functions for accessing the file_struct fd array.
38 struct fd { struct
45 static inline void fdput(struct fd fd) argument
47 if (fd.flags & FDPUT_FPUT)
48 fput(fd.file);
51 extern struct file *fget(unsigned int fd);
52 extern struct file *fget_raw(unsigned int fd);
53 extern struct file *fget_task(struct task_struct *task, unsigned int fd);
54 extern unsigned long __fdget(unsigned int fd);
64 fdget(unsigned int fd) argument
69 fdget_raw(unsigned int fd) argument
74 fdget_pos(int fd) argument
[all...]
/linux-master/tools/testing/selftests/efivarfs/
H A Dopen-unlink.c16 int fd; local
20 fd = open(path, O_RDONLY);
21 if (fd < 0)
22 return fd;
24 rc = ioctl(fd, FS_IOC_GETFLAGS, &flags);
27 close(fd);
37 rc = ioctl(fd, FS_IOC_SETFLAGS, &flags);
39 close(fd);
47 int fd; local
51 fd
72 int fd, rc; local
[all...]
/linux-master/drivers/clk/
H A Dclk-fractional-divider_test.c11 * Test the maximum denominator case for fd clock without flags.
18 struct clk_fractional_divider *fd; local
21 fd = kunit_kzalloc(test, sizeof(*fd), GFP_KERNEL);
22 KUNIT_ASSERT_NOT_NULL(test, fd);
24 fd->mwidth = 3;
25 fd->nwidth = 3;
32 clk_fractional_divider_general_approximation(&fd->hw, rate, &parent_rate, &m, &n);
40 * Test the maximum numerator case for fd clock without flags.
47 struct clk_fractional_divider *fd; local
76 struct clk_fractional_divider *fd; local
106 struct clk_fractional_divider *fd; local
[all...]
H A Dclk-fractional-divider.c53 static inline u32 clk_fd_readl(struct clk_fractional_divider *fd) argument
55 if (fd->flags & CLK_FRAC_DIVIDER_BIG_ENDIAN)
56 return ioread32be(fd->reg);
58 return readl(fd->reg);
61 static inline void clk_fd_writel(struct clk_fractional_divider *fd, u32 val) argument
63 if (fd->flags & CLK_FRAC_DIVIDER_BIG_ENDIAN)
64 iowrite32be(val, fd->reg);
66 writel(val, fd->reg);
71 struct clk_fractional_divider *fd = to_clk_fd(hw); local
77 if (fd
125 struct clk_fractional_divider *fd = to_clk_fd(hw); local
157 struct clk_fractional_divider *fd = to_clk_fd(hw); local
178 struct clk_fractional_divider *fd = to_clk_fd(hw); local
266 struct clk_fractional_divider *fd; local
319 struct clk_fractional_divider *fd; local
[all...]
/linux-master/tools/perf/tests/
H A Dwp.c16 #define WP_TEST_ASSERT_VAL(fd, text, val) \
19 wp_read(fd, &count, sizeof(long long)); \
27 static int wp_read(int fd, long long *count, int size) argument
29 int ret = read(fd, count, size);
56 int fd; local
60 fd = sys_perf_event_open(&attr, 0, -1, -1,
62 if (fd < 0) {
63 fd = -errno;
67 return fd;
77 int fd;
[all...]
/linux-master/Documentation/usb/
H A Dusbdevfs-drop-permissions.c19 void drop_privileges(int fd, uint32_t mask) argument
23 res = ioctl(fd, USBDEVFS_DROP_PRIVILEGES, &mask);
30 void reset_device(int fd) argument
34 res = ioctl(fd, USBDEVFS_RESET);
42 void claim_some_intf(int fd) argument
47 res = ioctl(fd, USBDEVFS_CLAIMINTERFACE, &i);
59 int c, fd; local
61 fd = open(argv[1], O_RDWR);
62 if (fd < 0) {
71 ioctl(fd, USBDEVFS_GET_CAPABILITIE
[all...]
/linux-master/samples/watchdog/
H A Dwatchdog-simple.c9 int fd = open("/dev/watchdog", O_WRONLY); local
11 if (fd == -1) {
16 ret = write(fd, "\0", 1);
23 close(fd);
/linux-master/tools/testing/selftests/proc/
H A Dproc-self-wchan.c25 int fd; local
27 fd = open("/proc/self/wchan", O_RDONLY);
28 if (fd == -1) {
35 if (read(fd, buf, sizeof(buf)) != 1)
/linux-master/arch/um/include/shared/skas/
H A Dstub-data.h13 int fd; member in struct:stub_data
/linux-master/arch/um/include/shared/
H A Dsigio.h9 extern int write_sigio_irq(int fd);
/linux-master/arch/um/os-Linux/
H A Dtty.c14 int fd; member in struct:grantpt_info
23 info->res = grantpt(info->fd);
30 int fd, err; local
32 fd = open("/dev/ptmx", O_RDWR);
33 if (fd < 0) {
40 info.fd = fd;
50 if (unlockpt(fd) < 0) {
56 return fd;
58 close(fd);
[all...]
/linux-master/tools/testing/selftests/bpf/
H A Dunpriv_helpers.c16 int fd, ret = false; local
18 fd = open("/proc/cmdline", O_RDONLY);
19 if (fd < 0) {
24 if (read(fd, cmdline, sizeof(cmdline) - 1) < 0) {
37 close(fd);
45 FILE *fd; local
47 fd = fopen("/proc/sys/" UNPRIV_SYSCTL, "r");
48 if (fd) {
49 disabled = (fgets(buf, 2, fd) == buf && atoi(buf));
50 fclose(fd);
[all...]
/linux-master/tools/testing/selftests/thermal/intel/power_floor/
H A Dpower_floor_test.c18 int fd; local
22 fd = open(POWER_FLOOR_ENABLE_ATTRIBUTE, O_RDWR);
23 if (fd < 0) {
28 if (write(fd, "0\n", 2) < 0) {
35 close(fd);
42 int fd, ret; local
52 fd = open(POWER_FLOOR_ENABLE_ATTRIBUTE, O_RDWR);
53 if (fd < 0) {
58 if (write(fd, "1\n", 2) < 0) {
63 close(fd);
[all...]
/linux-master/tools/perf/scripts/perl/
H A Drw-by-file.pl31 $common_pid, $common_comm, $common_callchain, $nr, $fd, $buf, $count) = @_;
34 $reads{$fd}{bytes_requested} += $count;
35 $reads{$fd}{total_reads}++;
42 $common_pid, $common_comm, $common_callchain, $nr, $fd, $buf, $count) = @_;
45 $writes{$fd}{bytes_written} += $count;
46 $writes{$fd}{total_writes}++;
54 printf("%6s %10s %10s\n", "fd", "# reads", "bytes_requested");
57 foreach my $fd (sort {$reads{$b}{bytes_requested} <=>
59 my $total_reads = $reads{$fd}{total_reads};
60 my $bytes_requested = $reads{$fd}{bytes_requeste
[all...]
/linux-master/tools/power/cpupower/utils/helpers/
H A Dmsr.c28 int fd; local
32 fd = open(msr_file_name, O_RDONLY);
33 if (fd < 0)
35 if (lseek(fd, idx, SEEK_CUR) == -1)
37 if (read(fd, val, sizeof *val) != sizeof *val)
39 close(fd);
42 close(fd);
57 int fd; local
61 fd = open(msr_file_name, O_WRONLY);
62 if (fd <
[all...]

Completed in 274 milliseconds

1234567891011>>