Home
last modified time | relevance | path

Searched refs:fcntl (Results 1 – 25 of 153) sorted by relevance

1234567

/linux/tools/testing/selftests/core/
H A Dclose_range_test.c5 #include <fcntl.h>
62 ret = fcntl(open_fds[i], F_DUPFD_QUERY, open_fds[i + 1]); in TEST()
73 EXPECT_EQ(-1, fcntl(open_fds[i], F_GETFL)); in TEST()
76 EXPECT_GT(fcntl(open_fds[i], F_GETFL), -1); in TEST()
89 EXPECT_EQ(-1, fcntl(open_fds[i], F_GETFL)); in TEST()
92 EXPECT_GT(fcntl(open_fds[i], F_GETFL), -1); in TEST()
98 EXPECT_EQ(-1, fcntl(open_fds[i], F_GETFL)); in TEST()
100 EXPECT_GT(fcntl(open_fds[i], F_GETFL), -1); in TEST()
104 EXPECT_EQ(-1, fcntl(open_fds[100], F_GETFL)); in TEST()
139 if (fcntl(open_fd in TEST()
[all...]
/linux/tools/testing/selftests/net/packetdrill/
H A Dtcp_syscall_bad_arg_fastopen-invalid-buf-ptr.pkt9 +0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
22 +0 fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0
28 +0 fcntl(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0
36 +0 fcntl(6, F_SETFL, O_RDWR|O_NONBLOCK) = 0
H A Dtcp_tcp_info_tcp-info-sndbuf-limited.pkt7 +0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
8 +0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
15 +0 fcntl(3, F_SETFL, O_RDWR) = 0 // set back to blocking
H A Dtcp_tcp_info_tcp-info-rwnd-limited.pkt8 +0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
9 +0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
19 +0 fcntl(3, F_SETFL, O_RDWR) = 0 // set back to blocking
H A Dtcp_tcp_info_tcp-info-last_data_recv.pkt7 +0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
8 +0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
H A Dtcp_timestamping_client-only-last-byte.pkt9 +0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
10 +0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
18 +0 fcntl(3, F_SETFL, O_RDWR) = 0 // set back to blocking
H A Dtcp_inq_client.pkt11 +0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
12 +0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
H A Dtcp_zerocopy_fastopen-client.pkt15 +0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
36 +0 fcntl(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0
/linux/tools/testing/selftests/filesystems/eventfd/
H A Deventfd_test.c5 #include <fcntl.h>
52 flags = fcntl(fd, F_GETFL); in TEST()
66 flags = fcntl(fd, F_GETFD); in TEST()
80 flags = fcntl(fd, F_GETFL); in TEST()
95 flags = fcntl(fd, F_GETFL); in TEST()
100 flags = fcntl(fd, F_GETFD); in TEST()
174 ret = fcntl(fd, F_GETFL); in TEST()
/linux/Documentation/filesystems/
H A Dlocks.rst34 installations use fcntl() instead of flock(). This is true of Slackware 3.0
37 file with fcntl() at the same time as the GDBM routines tried to lock this
46 is to make flock() and fcntl() locks oblivious to each other. Both can
53 cooperative flock()/fcntl() are those that emulate flock() using
54 fcntl(), with all the problems that implies.
H A Ddnotify.rst12 on a directory using a fcntl(2) call and the notifications themselves
33 information. However, if the F_SETSIG fcntl(2) call is used to let the
66 disabled, fcntl(fd, F_NOTIFY, ...) will return -EINVAL.
/linux/tools/perf/tests/
H A Dbp_signal_overflow.c19 #include <fcntl.h>
109 fcntl(fd, F_SETFL, O_RDWR|O_NONBLOCK|O_ASYNC); in test__bp_signal_overflow()
110 fcntl(fd, F_SETSIG, SIGIO); in test__bp_signal_overflow()
111 fcntl(fd, F_SETOWN, getpid()); in test__bp_signal_overflow()
H A Dbp_signal.c20 #include <fcntl.h>
132 fcntl(fd, F_SETFL, O_RDWR|O_NONBLOCK|O_ASYNC); in __event()
133 fcntl(fd, F_SETSIG, sig); in __event()
134 fcntl(fd, F_SETOWN, getpid()); in __event()
/linux/tools/testing/selftests/memfd/
H A Dfuse_test.c23 #include <fcntl.h>
68 r = fcntl(fd, F_GET_SEALS); in mfd_assert_get_seals()
95 r = fcntl(fd, F_ADD_SEALS, seals); in mfd_assert_add_seals()
108 r = fcntl(fd, F_GET_SEALS); in mfd_busy_add_seals()
114 r = fcntl(fd, F_ADD_SEALS, seals); in mfd_busy_add_seals()
/linux/tools/testing/selftests/perf_events/
H A Dwatermark_signal.c5 #include <fcntl.h>
91 if (fcntl(fd, F_SETFL, FASYNC)) { in TEST()
96 if (fcntl(fd, F_SETOWN, getpid())) { in TEST()
101 if (fcntl(fd, F_SETSIG, SIGIO)) { in TEST()
/linux/tools/testing/selftests/filesystems/
H A Ddnotify_test.c3 #include <fcntl.h> /* in glibc 2.2 this has the needed
27 fcntl(fd, F_SETSIG, SIGRTMIN + 1); in main()
28 fcntl(fd, F_NOTIFY, DN_MODIFY|DN_CREATE|DN_MULTISHOT); in main()
/linux/arch/um/os-Linux/
H A Dsigio.c8 #include <fcntl.h>
187 flags = fcntl(master, F_GETFL); in async_pty()
191 if ((fcntl(master, F_SETFL, flags | O_NONBLOCK | O_ASYNC) < 0) || in async_pty()
192 (fcntl(master, F_SETOWN, os_getpid()) < 0)) in async_pty()
195 if ((fcntl(slave, F_SETFL, flags | O_NONBLOCK) < 0)) in async_pty()
/linux/tools/testing/selftests/hid/tests/
H A Dbase_device.py22 import fcntl
268 flag = fcntl.fcntl(fd, fcntl.F_GETFD)
269 fcntl.fcntl(fd, fcntl.F_SETFL, flag | os.O_NONBLOCK)
/linux/tools/crypto/ccp/
H A Dtest_dbc.py7 import fcntl
84 fcntl.ioctl(self.d, INVALID1, self.data, True)
93 fcntl.ioctl(self.d, INVALID2, self.data, True)
102 fcntl.ioctl(self.d, INVALID3, self.data, True)
110 fcntl.ioctl(self.d, INVALID4, self.data, True)
118 fcntl.ioctl(self.d, INVALID5, self.data, True)
/linux/samples/timers/
H A Dhpet_example.c5 #include <fcntl.h>
251 if ((fcntl(fd, F_SETOWN, getpid()) == 1) || in hpet_fasync()
252 ((value = fcntl(fd, F_GETFL)) == 1) || in hpet_fasync()
253 (fcntl(fd, F_SETFL, value | O_ASYNC) == 1)) { in hpet_fasync()
254 fprintf(stderr, "hpet_fasync: fcntl failed\n"); in hpet_fasync()
/linux/drivers/net/ethernet/sfc/
H A Dmcdi_port_common.c283 u32 speed, u32 flags, u32 fcntl) in efx_mcdi_phy_decode_link() argument
285 switch (fcntl) { in efx_mcdi_phy_decode_link()
1087 u32 fcntl; in efx_mcdi_set_mac() local
1104 fcntl = MC_CMD_FCNTL_BIDIR; in efx_mcdi_set_mac()
1107 fcntl = MC_CMD_FCNTL_RESPOND; in efx_mcdi_set_mac()
1110 fcntl = MC_CMD_FCNTL_OFF; in efx_mcdi_set_mac()
1114 fcntl = MC_CMD_FCNTL_AUTO; in efx_mcdi_set_mac()
1116 fcntl = MC_CMD_FCNTL_OFF; in efx_mcdi_set_mac()
1118 MCDI_SET_DWORD(cmdbytes, SET_MAC_IN_FCNTL, fcntl); in efx_mcdi_set_mac()
1269 u32 flags, fcntl, spee in efx_mcdi_process_link_change() local
[all...]
/linux/drivers/net/ethernet/sfc/siena/
H A Dmcdi_port_common.c284 u32 speed, u32 flags, u32 fcntl) in efx_mcdi_phy_decode_link() argument
286 switch (fcntl) { in efx_mcdi_phy_decode_link()
1104 u32 fcntl; in efx_siena_mcdi_set_mac() local
1126 fcntl = MC_CMD_FCNTL_BIDIR; in efx_siena_mcdi_set_mac()
1129 fcntl = MC_CMD_FCNTL_RESPOND; in efx_siena_mcdi_set_mac()
1132 fcntl = MC_CMD_FCNTL_OFF; in efx_siena_mcdi_set_mac()
1136 fcntl = MC_CMD_FCNTL_AUTO; in efx_siena_mcdi_set_mac()
1138 fcntl = MC_CMD_FCNTL_OFF; in efx_siena_mcdi_set_mac()
1140 MCDI_SET_DWORD(cmdbytes, SET_MAC_IN_FCNTL, fcntl); in efx_siena_mcdi_set_mac()
1263 u32 flags, fcntl, spee in efx_siena_mcdi_process_link_change() local
[all...]
/linux/tools/testing/selftests/filelock/
H A Dofdlocks.c4 #include <fcntl.h>
17 ret = fcntl(fd, F_OFD_SETLK, fl); in lock_set()
19 perror("fcntl()"); in lock_set()
29 ret = fcntl(fd, F_OFD_GETLK, fl); in lock_get()
31 perror("fcntl()"); in lock_get()
/linux/tools/testing/selftests/tpm2/
H A Dtpm2.py9 import fcntl
369 flags = fcntl.fcntl(self.tpm, fcntl.F_GETFL)
371 fcntl.fcntl(self.tpm, fcntl.F_SETFL, flags)
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dperf_skip.c85 err = fcntl(perf_fd, F_SETFL, O_ASYNC); in serial_test_perf_skip()
86 if (!ASSERT_OK(err, "fcntl(F_SETFL, O_ASYNC)")) in serial_test_perf_skip()
91 err = fcntl(perf_fd, F_SETOWN_EX, &owner); in serial_test_perf_skip()
92 if (!ASSERT_OK(err, "fcntl(F_SETOWN_EX)")) in serial_test_perf_skip()

1234567