Home
last modified time | relevance | path

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

12345678910>>...14

/external/bison/lib/
Dpipe2.c120 if ((fcntl_flags = fcntl (fd[1], F_GETFL, 0)) < 0 in pipe2()
121 || fcntl (fd[1], F_SETFL, fcntl_flags | O_NONBLOCK) == -1 in pipe2()
122 || (fcntl_flags = fcntl (fd[0], F_GETFL, 0)) < 0 in pipe2()
123 || fcntl (fd[0], F_SETFL, fcntl_flags | O_NONBLOCK) == -1) in pipe2()
131 if ((fcntl_flags = fcntl (fd[1], F_GETFD, 0)) < 0 in pipe2()
132 || fcntl (fd[1], F_SETFD, fcntl_flags | FD_CLOEXEC) == -1 in pipe2()
133 || (fcntl_flags = fcntl (fd[0], F_GETFD, 0)) < 0 in pipe2()
134 || fcntl (fd[0], F_SETFD, fcntl_flags | FD_CLOEXEC) == -1) in pipe2()
Dfcntl.in.h88 # undef fcntl
89 # define fcntl rpl_fcntl
91 _GL_FUNCDECL_RPL (fcntl, int, (int fd, int action, ...));
92 _GL_CXXALIAS_RPL (fcntl, int, (int fd, int action, ...));
95 _GL_FUNCDECL_SYS (fcntl, int, (int fd, int action, ...));
97 _GL_CXXALIAS_SYS (fcntl, int, (int fd, int action, ...));
99 _GL_CXXALIASWARN (fcntl);
101 # undef fcntl
103 _GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - "
Dfcntl.c31 # define rpl_fcntl fcntl
33 #undef fcntl
194 int flags = fcntl (fd, F_GETFD); in rpl_fcntl()
200 result = fcntl (fd, action, target); in rpl_fcntl()
201 if (0 <= result && fcntl (fd, F_SETFD, flags) == -1) in rpl_fcntl()
235 result = fcntl (fd, action, target); in rpl_fcntl()
256 int flags = fcntl (result, F_GETFD); in rpl_fcntl()
257 if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1) in rpl_fcntl()
302 result = fcntl (fd, action, p); in rpl_fcntl()
Dcloexec.c43 int flags = fcntl (desc, F_GETFD, 0); in set_cloexec_flag()
50 || fcntl (desc, F_SETFD, newflags) != -1) in set_cloexec_flag()
82 return fcntl (fd, F_DUPFD_CLOEXEC, 0); in dup_cloexec()
Ddup2.c100 return fcntl (fd, F_GETFL) == -1 ? -1 : fd; in rpl_dup2()
140 int result = fcntl (fd, F_GETFL) < 0 ? -1 : fd; in dup2()
145 result = fcntl (fd, F_DUPFD, desired_fd); in dup2()
/external/clang/test/Sema/
Dwarn-type-safety.c127 static const int F_DUPFD_tag __attribute__(( type_tag_for_datatype(fcntl,int) )) = F_DUPFD;
128 static const int F_SETLK_tag __attribute__(( type_tag_for_datatype(fcntl,struct flock *) )) = F_SET…
130 int fcntl(int fd, int cmd, ...) __attribute__(( argument_with_type_tag(fcntl,3,2) ));
134 fcntl(0, F_DUPFD, 10); // no-warning in test_argument_with_type_tag()
135 fcntl(0, F_SETLK, f); // no-warning in test_argument_with_type_tag()
137fcntl(0, F_SETLK, 10); // expected-warning {{argument type 'int' doesn't match specified 'fcntl' t… in test_argument_with_type_tag()
138fcntl(0, F_DUPFD, f); // expected-warning {{argument type 'struct flock *' doesn't match specifie… in test_argument_with_type_tag()
142 fcntl(0, b ? F_DUPFD : F_SETLK, 10); // no-warning in test_tag_expresssion()
143 fcntl(0, b + F_DUPFD, 10); // no-warning in test_tag_expresssion()
144 fcntl(0, (b, F_DUPFD), 10); // expected-warning {{expression result unused}} in test_tag_expresssion()
/external/bison/m4/
Dfcntl.m41 # fcntl.m4 serial 5
7 # For now, this module ensures that fcntl()
22 AC_CHECK_FUNCS_ONCE([fcntl])
28 AC_CACHE_CHECK([whether fcntl handles F_DUPFD correctly],
31 #include <fcntl.h>
34 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
53 AC_CACHE_CHECK([whether fcntl understands F_DUPFD_CLOEXEC],
56 #include <fcntl.h>
76 dnl Replace fcntl() for supporting the gnulib-defined fchdir() function,
89 AC_CHECK_FUNCS_ONCE([fcntl])
Dfcntl_h.m42 # Configure fcntl.h.
14 gl_NEXT_HEADERS([fcntl.h])
25 gl_WARN_ON_USE_PREPARE([[#include <fcntl.h>
26 ]], [fcntl openat])
/external/chromium_org/build/android/pylib/
Dcmd_helper.py18 import fcntl
20 fcntl = None variable
132 assert fcntl, 'fcntl module is required'
143 fl = fcntl.fcntl(child_fd, fcntl.F_GETFL)
144 fcntl.fcntl(child_fd, fcntl.F_SETFL, fl | os.O_NONBLOCK)
Dports.py8 import fcntl
53 fcntl.flock(fp_lock, fcntl.LOCK_EX)
73 fcntl.flock(fp_lock, fcntl.LOCK_UN)
/external/chromium_org/tools/gyp/pylib/gyp/
Dflock_tool.py9 import fcntl
43 op = struct.pack('hhllhhl', fcntl.F_WRLCK, 0, 0, 0, 0, 0, 0)
44 fcntl.fcntl(fd, fcntl.F_SETLK, op)
/external/chromium_org/mojo/common/test/
Dtest_utils_posix.cc21 int original_flags = fcntl(handle.fd, F_GETFL); in BlockingWrite()
23 fcntl(handle.fd, F_SETFL, original_flags & (~O_NONBLOCK)) != 0) { in BlockingWrite()
29 fcntl(handle.fd, F_SETFL, original_flags); in BlockingWrite()
42 int original_flags = fcntl(handle.fd, F_GETFL); in BlockingRead()
44 fcntl(handle.fd, F_SETFL, original_flags & (~O_NONBLOCK)) != 0) { in BlockingRead()
50 fcntl(handle.fd, F_SETFL, original_flags); in BlockingRead()
/external/bison/darwin-lib/
Dfcntl.h41 #include_next <fcntl.h>
61 #include_next <fcntl.h>
400 # undef fcntl
401 # define fcntl rpl_fcntl
403 _GL_FUNCDECL_RPL (fcntl, int, (int fd, int action, ...));
404 _GL_CXXALIAS_RPL (fcntl, int, (int fd, int action, ...));
407 _GL_FUNCDECL_SYS (fcntl, int, (int fd, int action, ...));
409 _GL_CXXALIAS_SYS (fcntl, int, (int fd, int action, ...));
411 _GL_CXXALIASWARN (fcntl);
413 # undef fcntl
[all …]
/external/bison/linux-lib/
Dfcntl.h41 #include_next <fcntl.h>
61 #include_next <fcntl.h>
400 # undef fcntl
401 # define fcntl rpl_fcntl macro
403 _GL_FUNCDECL_RPL (fcntl, int, (int fd, int action, ...));
404 _GL_CXXALIAS_RPL (fcntl, int, (int fd, int action, ...));
407 _GL_FUNCDECL_SYS (fcntl, int, (int fd, int action, ...));
409 _GL_CXXALIAS_SYS (fcntl, int, (int fd, int action, ...));
411 _GL_CXXALIASWARN (fcntl);
413 # undef fcntl
[all …]
/external/chromium_org/tools/telemetry/third_party/pyserial/serial/
Dserialposix.py15 import sys, os, fcntl, termios, struct, select, errno, time
27 FCNTL = fcntl
145 import array, fcntl
148 fcntl.ioctl(port.fd, IOSSIOSPEED, buf, 1)
449 s = fcntl.ioctl(self.fd, TIOCINQ, TIOCM_zero_str)
546 fcntl.ioctl(self.fd, TIOCSBRK)
548 fcntl.ioctl(self.fd, TIOCCBRK)
554 fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_RTS_str)
556 fcntl.ioctl(self.fd, TIOCMBIC, TIOCM_RTS_str)
562 fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str)
[all …]
/external/chromium_org/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/
Dserver_process.py50 import fcntl
148 fl = fcntl.fcntl(fd, fcntl.F_GETFL)
149 fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NONBLOCK)
151 fl = fcntl.fcntl(fd, fcntl.F_GETFL)
152 fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NONBLOCK)
/external/qemu/util/
Doslib-posix.c158 f = fcntl(fd, F_GETFL); in qemu_set_block()
159 fcntl(fd, F_SETFL, f & ~O_NONBLOCK); in qemu_set_block()
165 f = fcntl(fd, F_GETFL); in qemu_set_nonblock()
166 fcntl(fd, F_SETFL, f | O_NONBLOCK); in qemu_set_nonblock()
188 f = fcntl(fd, F_GETFD); in qemu_set_cloexec()
189 fcntl(fd, F_SETFD, f | FD_CLOEXEC); in qemu_set_cloexec()
/external/chromium_org/sandbox/linux/bpf_dsl/
Dbpf_dsl_unittest.cc44 static int fcntl(int fd, int cmd, unsigned long arg = 0) { in fcntl() function in sandbox::bpf_dsl::__anonbc210b950111::Stubs
319 ASSERT_SYSCALL_RESULT(-ENOENT, fcntl, sock_fd.get(), F_GETFD); in BPF_TEST_C()
320 ASSERT_SYSCALL_RESULT(-ENOENT, fcntl, sock_fd.get(), F_GETFL); in BPF_TEST_C()
322 ASSERT_SYSCALL_RESULT(0, fcntl, sock_fd.get(), F_SETFD, O_CLOEXEC); in BPF_TEST_C()
323 ASSERT_SYSCALL_RESULT(-EINVAL, fcntl, sock_fd.get(), F_SETFD, 0); in BPF_TEST_C()
325 ASSERT_SYSCALL_RESULT(-EPERM, fcntl, sock_fd.get(), F_SETFL, O_RDONLY); in BPF_TEST_C()
327 ASSERT_SYSCALL_RESULT(-EACCES, fcntl, sock_fd.get(), F_DUPFD, 0); in BPF_TEST_C()
/external/valgrind/main/memcheck/tests/
Dfile_locking.c33 return fcntl(fd, F_SETLK, &fl) >= 0; in lock_file()
49 flags = fcntl(fd, F_GETFD); in open_lock_and_map()
51 if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) < 0) in open_lock_and_map()
/external/chromium_org/third_party/cython/src/Cython/Includes/posix/
Dfcntl.pxd1 # http://www.opengroup.org/onlinepubs/009695399/basedefs/fcntl.h.html
3 cdef extern from "fcntl.h" nogil:
64 int fcntl(int, int, ...)
/external/bluetooth/bluedroid/osi/src/
Dsemaphore.c70 int flags = fcntl(semaphore->fd, F_GETFL); in semaphore_try_wait()
75 if (fcntl(semaphore->fd, F_SETFL, flags | O_NONBLOCK) == -1) { in semaphore_try_wait()
84 if (fcntl(semaphore->fd, F_SETFL, flags) == -1) in semaphore_try_wait()
/external/linux-tools-perf/perf-3.12.0/tools/perf/tests/
Dbp_signal_overflow.c100 fcntl(fd, F_SETFL, O_RDWR|O_NONBLOCK|O_ASYNC); in test__bp_signal_overflow()
101 fcntl(fd, F_SETSIG, SIGIO); in test__bp_signal_overflow()
102 fcntl(fd, F_SETOWN, getpid()); in test__bp_signal_overflow()
/external/chromium_org/third_party/libusb/src/libusb/os/
Dpoll_posix.c34 ret = fcntl(pipefd[1], F_GETFL); in usbi_pipe()
39 ret = fcntl(pipefd[1], F_SETFL, ret | O_NONBLOCK); in usbi_pipe()
/external/dhcpcd/
Dcommon.c114 if ((flags = fcntl(fd, F_GETFD, 0)) == -1 || in set_cloexec()
115 fcntl(fd, F_SETFD, flags | FD_CLOEXEC) == -1) in set_cloexec()
128 if ((flags = fcntl(fd, F_GETFL, 0)) == -1 || in set_nonblock()
129 fcntl(fd, F_SETFL, flags | O_NONBLOCK) == -1) in set_nonblock()
/external/chromium_org/components/nacl/loader/nonsfi/
Dnonsfi_sandbox_unittest.cc266 BPF_ASSERT_EQ(0, fcntl(fds[0].get(), F_SETFD, FD_CLOEXEC)); in BPF_TEST_C()
275 fcntl(fds[0].get(), F_SETFD, 99); in BPF_DEATH_TEST_C()
284 BPF_ASSERT_EQ(0, fcntl(fd, F_GETFL)); in BPF_TEST_C()
285 BPF_ASSERT_EQ(0, fcntl(fd, F_SETFL, O_RDWR | O_NONBLOCK)); in BPF_TEST_C()
286 BPF_ASSERT_EQ(O_NONBLOCK, fcntl(fd, F_GETFL)); in BPF_TEST_C()
295 fcntl(fds[0].get(), F_SETFL, O_APPEND); in BPF_DEATH_TEST_C()
302 fcntl(0, F_DUPFD); in BPF_DEATH_TEST_C()
309 fcntl(0, F_DUPFD_CLOEXEC); in BPF_DEATH_TEST_C()

12345678910>>...14