Home
last modified time | relevance | path

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

1234

/Linux-v5.4/arch/um/os-Linux/
Dfile.c202 if (flags.cl && fcntl(fd, F_SETFD, 1)) { in os_open_file()
364 CATCH_EINTR(err = fcntl(fd, F_SETFD, FD_CLOEXEC)); in os_set_exec_close()
404 flags = fcntl(fd, F_GETFL); in os_set_fd_async()
409 if (fcntl(fd, F_SETFL, flags) < 0) { in os_set_fd_async()
416 if ((fcntl(fd, F_SETSIG, SIGIO) < 0) || in os_set_fd_async()
417 (fcntl(fd, F_SETOWN, os_getpid()) < 0)) { in os_set_fd_async()
431 flags = fcntl(fd, F_GETFL); in os_clear_fd_async()
436 if (fcntl(fd, F_SETFL, flags) < 0) in os_clear_fd_async()
445 flags = fcntl(fd, F_GETFL); in os_set_fd_block()
454 if (fcntl(fd, F_SETFL, flags) < 0) in os_set_fd_block()
[all …]
Dsigio.c415 flags = fcntl(master, F_GETFL); in async_pty()
419 if ((fcntl(master, F_SETFL, flags | O_NONBLOCK | O_ASYNC) < 0) || in async_pty()
420 (fcntl(master, F_SETOWN, os_getpid()) < 0)) in async_pty()
423 if ((fcntl(slave, F_SETFL, flags | O_NONBLOCK) < 0)) in async_pty()
/Linux-v5.4/tools/perf/tests/
Dbp_signal_overflow.c103 fcntl(fd, F_SETFL, O_RDWR|O_NONBLOCK|O_ASYNC); in test__bp_signal_overflow()
104 fcntl(fd, F_SETSIG, SIGIO); in test__bp_signal_overflow()
105 fcntl(fd, F_SETOWN, getpid()); in test__bp_signal_overflow()
Dbp_signal.c136 fcntl(fd, F_SETFL, O_RDWR|O_NONBLOCK|O_ASYNC); in __event()
137 fcntl(fd, F_SETSIG, sig); in __event()
138 fcntl(fd, F_SETOWN, getpid()); in __event()
/Linux-v5.4/tools/testing/selftests/memfd/
Dfuse_test.c67 r = fcntl(fd, F_GET_SEALS); in mfd_assert_get_seals()
94 r = fcntl(fd, F_ADD_SEALS, seals); in mfd_assert_add_seals()
107 r = fcntl(fd, F_GET_SEALS); in mfd_busy_add_seals()
113 r = fcntl(fd, F_ADD_SEALS, seals); in mfd_busy_add_seals()
Dmemfd_test.c90 r = fcntl(fd, F_GET_SEALS); in mfd_assert_get_seals()
116 r = fcntl(fd, F_ADD_SEALS, seals); in mfd_assert_add_seals()
128 r = fcntl(fd, F_GET_SEALS); in mfd_fail_add_seals()
134 r = fcntl(fd, F_ADD_SEALS, seals); in mfd_fail_add_seals()
/Linux-v5.4/Documentation/filesystems/
Dlocks.txt30 installations use fcntl() instead of flock(). This is true of Slackware 3.0
33 file with fcntl() at the same time as the GDBM routines tried to lock this
42 is to make flock() and fcntl() locks oblivious to each other. Both can
49 cooperative flock()/fcntl() are those that emulate flock() using
50 fcntl(), with all the problems that implies.
Dmandatory-locking.txt32 processes. File locks are applied using the flock() and fcntl() system calls
33 (and the lockf() library routine which is a wrapper around fcntl().) It is
53 as candidates for mandatory locking, and using the existing fcntl()/lockf()
57 the whole truth. System V locking is based on fcntl(). The granularity of
58 fcntl() is such that it allows the locking of byte ranges in files, in addition
63 borrowing the fcntl() locking scheme from System V. The mandatory locking
118 1. Mandatory locks can only be applied via the fcntl()/lockf() locking
Ddnotify.txt9 on a directory using a fcntl(2) call and the notifications themselves
28 information. However, if the F_SETSIG fcntl(2) call is used to let the
61 disabled, fcntl(fd, F_NOTIFY, ...) will return -EINVAL.
/Linux-v5.4/tools/testing/selftests/filesystems/
Ddnotify_test.c27 fcntl(fd, F_SETSIG, SIGRTMIN + 1); in main()
28 fcntl(fd, F_NOTIFY, DN_MODIFY|DN_CREATE|DN_MULTISHOT); in main()
/Linux-v5.4/samples/timers/
Dhpet_example.c251 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()
/Linux-v5.4/drivers/net/ethernet/sfc/
Dmcdi_port.c327 u32 speed, u32 flags, u32 fcntl) in efx_mcdi_phy_decode_link() argument
329 switch (fcntl) { in efx_mcdi_phy_decode_link()
1154 u32 flags, fcntl, speed, lpa; in efx_mcdi_process_link_change() local
1161 fcntl = EFX_QWORD_FIELD(*ev, MCDI_EVENT_LINKCHANGE_FCNTL); in efx_mcdi_process_link_change()
1168 efx_mcdi_phy_decode_link(efx, &efx->link_state, speed, flags, fcntl); in efx_mcdi_process_link_change()
1177 u32 fcntl; in efx_mcdi_set_mac() local
1200 fcntl = MC_CMD_FCNTL_BIDIR; in efx_mcdi_set_mac()
1203 fcntl = MC_CMD_FCNTL_RESPOND; in efx_mcdi_set_mac()
1206 fcntl = MC_CMD_FCNTL_OFF; in efx_mcdi_set_mac()
1210 fcntl = MC_CMD_FCNTL_AUTO; in efx_mcdi_set_mac()
[all …]
/Linux-v5.4/Documentation/media/uapi/dvb/
Dfrontend_f_open.rst27 #include <fcntl.h>
73 versa) using the F_SETFL command of the fcntl system call. This is a
74 standard system call, documented in the Linux manual page for fcntl.
Dca-fopen.rst67 using the ``F_SETFL`` command of the ``fcntl`` system call. This is a
68 standard system call, documented in the Linux manual page for fcntl.
Daudio-fopen.rst81 of the fcntl system call. This is a standard system call, documented in
82 the Linux manual page for fcntl. Only one user can open the Audio Device
Dvideo-fopen.rst81 using the F_SETFL command of the fcntl system call. This is a standard
82 system call, documented in the Linux manual page for fcntl. Only one
/Linux-v5.4/tools/perf/trace/beauty/
DBuild2 perf-y += fcntl.o
/Linux-v5.4/tools/testing/selftests/drivers/dma-buf/
Dudmabuf.c42 ret = fcntl(memfd, F_ADD_SEALS, F_SEAL_SHRINK); in main()
/Linux-v5.4/include/uapi/asm-generic/
DKbuild11 mandatory-y += fcntl.h
/Linux-v5.4/tools/testing/selftests/vm/
Duserfaultfd.c663 uffd_flags = fcntl(uffd, F_GETFD, NULL); in userfaultfd_open()
927 fcntl(uffd, F_SETFL, uffd_flags | O_NONBLOCK); in userfaultfd_events_test()
986 fcntl(uffd, F_SETFL, uffd_flags | O_NONBLOCK); in userfaultfd_sig_test()
1114 fcntl(uffd, F_SETFL, uffd_flags | O_NONBLOCK); in userfaultfd_stress()
1116 fcntl(uffd, F_SETFL, uffd_flags & ~O_NONBLOCK); in userfaultfd_stress()
/Linux-v5.4/tools/virtio/virtio-trace/
Dtrace-agent-rw.c76 if (fcntl(*data_pipe, F_SETPIPE_SZ, pipe_size) < 0) { in rw_thread_init()
/Linux-v5.4/tools/power/acpi/tools/acpidbg/
Dacpidbg.c101 ret = fcntl(fd, F_GETFL, 0); in acpi_aml_set_fl()
107 ret = fcntl(fd, F_SETFL, flags); in acpi_aml_set_fl()
/Linux-v5.4/tools/testing/selftests/sync/
Dsync.c185 status = fcntl(fd, F_GETFD, 0); in sw_sync_timeline_is_valid()
/Linux-v5.4/tools/testing/selftests/net/
Dnettest.c1146 flags = fcntl(sd, F_GETFL); in lsock_init()
1147 if ((flags < 0) || (fcntl(sd, F_SETFL, flags|O_NONBLOCK) < 0)) { in lsock_init()
1152 if (fcntl(sd, F_SETFD, FD_CLOEXEC) < 0) in lsock_init()
1295 flags = fcntl(sd, F_GETFL); in connectsock()
1296 if ((flags < 0) || (fcntl(sd, F_SETFL, flags|O_NONBLOCK) < 0)) { in connectsock()
/Linux-v5.4/Documentation/media/uapi/mediactl/
Dmedia-func-open.rst27 #include <fcntl.h>

1234