Home
last modified time | relevance | path

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

12345678910>>...22

/external/ltp/testcases/kernel/syscalls/fcntl/
Dfcntl01.c75 if ((fd[2] = fcntl(fd[1], F_DUPFD, 1)) == -1) in main()
82 if ((fd[4] = fcntl(fd[1], F_DUPFD, fd2[3])) < 0) in main()
89 if ((fd[8] = fcntl(fd[1], F_DUPFD, fd2[5])) < 0) in main()
96 flags = fcntl(fd[2], F_GETFL, 0); in main()
102 if (fcntl(fd[2], F_SETFL, O_NDELAY) == -1) in main()
105 flags = fcntl(fd[2], F_GETFL, 0); in main()
111 if (fcntl(fd[2], F_SETFL, O_APPEND) == -1) in main()
114 flags = fcntl(fd[2], F_GETFL, 0); in main()
120 if (fcntl(fd[2], F_SETFL, O_NDELAY | O_APPEND) < 0) in main()
123 flags = fcntl(fd[2], F_GETFL, 0); in main()
[all …]
Dfcntl31.c114 if (fcntl(test_fd, F_SETFL, O_ASYNC) < 0) in setup()
131 TEST(fcntl(test_fd, F_GETOWN_EX, &orig_own_ex)); in setup()
140 TEST(fcntl(test_fd, F_GETOWN)); in setup()
160 TEST(fcntl(test_fd, F_SETOWN, pid)); in setown_pid_test()
167 TEST(fcntl(test_fd, F_SETOWN, orig_pid)); in setown_pid_test()
176 TEST(fcntl(test_fd, F_SETOWN, -pgrp_pid)); in setown_pgrp_test()
184 TEST(fcntl(test_fd, F_SETOWN, orig_pid)); in setown_pgrp_test()
194 TEST(fcntl(test_fd, F_SETOWN_EX, &orig_own_ex)); in setownex_cleanup()
213 TEST(fcntl(test_fd, F_SETOWN_EX, &tst_own_ex)); in setownex_tid_test()
235 TEST(fcntl(test_fd, F_SETOWN_EX, &tst_own_ex)); in setownex_pid_test()
[all …]
Dfcntl13.c61 if (fcntl(1, F_BADCMD, 1) != -1) in main()
69 if (fcntl(1, F_SETLK, (void *)-1) != -1) { in main()
78 if (fcntl(1, F_SETLKW, (void *)-1) != -1) { in main()
87 if (fcntl(1, F_GETLK, (void *)-1) != -1) { in main()
104 if (fcntl(1, F_SETLK, &flock) != -1) in main()
111 if (fcntl(-1, F_GETLK, &flock) != -1) in main()
Dfcntl15.c121 if ((fcntl(fd_B, F_SETLK, &flock)) < 0) { in dochild1()
258 if ((fcntl(fd_C, F_SETLK, &flock)) >= 0) { in dochild2()
271 if ((fcntl(fd_C, F_SETLK, &flock)) >= 0) { in dochild2()
322 if ((fcntl(fd_C, F_SETLK, &flock)) < 0) { in dochild2()
336 if ((fcntl(fd_C, F_SETLK, &flock)) >= 0) { in dochild2()
342 if ((fcntl(fd_C, F_SETLK, &flock)) < 0) { in dochild2()
405 if ((fd_B = fcntl(fd_A, F_DUPFD, 0)) < 0) { in run_test()
422 if ((fcntl(fd_A, F_SETLK, &flock)) < 0) { in run_test()
436 if ((fcntl(fd_B, F_SETLK, &flock)) < 0) { in run_test()
/external/ltp/testcases/kernel/syscalls/
D.gitignore167 /fcntl/fcntl01
168 /fcntl/fcntl01_64
169 /fcntl/fcntl02
170 /fcntl/fcntl02_64
171 /fcntl/fcntl03
172 /fcntl/fcntl03_64
173 /fcntl/fcntl04
174 /fcntl/fcntl04_64
175 /fcntl/fcntl05
176 /fcntl/fcntl05_64
[all …]
/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/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()
/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])
/external/chromium-trace/catapult/common/py_utils/py_utils/
Dlock.py26 import fcntl # pylint: disable=import-error
27 LOCK_EX = fcntl.LOCK_EX
28 LOCK_SH = fcntl.LOCK_SH
29 LOCK_NB = fcntl.LOCK_NB
107 fcntl.flock(target_file.fileno(), flags)
117 fcntl.flock(target_file.fileno(), fcntl.LOCK_UN)
/external/autotest/client/deps/lansim/src/py/
Dtuntap.py5 import fcntl
112 ifs = fcntl.ioctl(fd, pyiftun.TUNSETIFF,
129 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCGIFMTU,
136 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCGIFFLAGS,
143 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCSIFFLAGS,
154 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCGIFADDR,
170 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCSIFADDR,
177 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCSIFNETMASK,
187 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCGIFHWADDR,
202 ifs = fcntl.ioctl(self._sock, pyiftun.SIOCSIFHWADDR,
/external/autotest/scheduler/
Dstatus_server.py1 import BaseHTTPServer, cgi, threading, urllib, fcntl, logging
106 old_flags = fcntl.fcntl(self.fileno(), fcntl.F_GETFD)
107 fcntl.fcntl(self.fileno(), fcntl.F_SETFD, old_flags | fcntl.FD_CLOEXEC)
/external/libmojo/mojo/edk/test/
Dtest_utils_posix.cc21 int original_flags = fcntl(handle.handle, F_GETFL); in BlockingWrite()
23 fcntl(handle.handle, F_SETFL, original_flags & (~O_NONBLOCK)) != 0) { in BlockingWrite()
29 fcntl(handle.handle, F_SETFL, original_flags); in BlockingWrite()
42 int original_flags = fcntl(handle.handle, F_GETFL); in BlockingRead()
44 fcntl(handle.handle, F_SETFL, original_flags & (~O_NONBLOCK)) != 0) { in BlockingRead()
50 fcntl(handle.handle, F_SETFL, original_flags); in BlockingRead()
/external/autotest/client/bin/
Dautotestd4 import sys, os, subprocess, fcntl
40 fcntl.flock(exit_file, fcntl.LOCK_EX)
49 fcntl.flock(exit_file, fcntl.LOCK_UN)
Dautotestd_monitor4 import sys, os, signal, time, subprocess, fcntl
46 fcntl.flock(exit_code_file, fcntl.LOCK_EX)
55 fcntl.flock(exit_code_file, fcntl.LOCK_UN)
/external/libmojo/third_party/catapult/devil/devil/utils/
Dcmd_helper.py19 import fcntl
21 fcntl = None variable
216 assert fcntl, 'fcntl module is required'
220 fl = fcntl.fcntl(child_fd, fcntl.F_GETFL)
221 fcntl.fcntl(child_fd, fcntl.F_SETFL, fl | os.O_NONBLOCK)
/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/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/chromium-trace/catapult/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/autotest/client/cros/cellular/wardmodem/
Dat_channel.py5 import fcntl
76 flags = fcntl.fcntl(self._channel, fcntl.F_GETFL)
78 fcntl.fcntl(self._channel, fcntl.F_SETFL, flags)
Dat_channel_unittest.py9 import fcntl
40 flags = fcntl.fcntl(self._channel_file.fileno(), fcntl.F_GETFL)
42 fcntl.fcntl(self._channel_file.fileno(), fcntl.F_SETFL, flags)
/external/chromium-trace/catapult/devil/devil/utils/
Dcmd_helper.py20 import fcntl
22 fcntl = None variable
246 assert fcntl, 'fcntl module is required'
250 fl = fcntl.fcntl(child_fd, fcntl.F_GETFL)
251 fcntl.fcntl(child_fd, fcntl.F_SETFL, fl | os.O_NONBLOCK)
/external/autotest/client/site_tests/firmware_TouchMTB/
Dkeyboard_device.py7 import fcntl
42 fcntl.fcntl(fd, fcntl.F_SETFL, os.O_NONBLOCK)
/external/toolchain-utils/automation/common/
Dcommand_executer.py11 import fcntl
120 fd_flags = fcntl.fcntl(fd, fcntl.F_GETFL)
121 fcntl.fcntl(fd, fcntl.F_SETFL, fd_flags | os.O_NONBLOCK)

12345678910>>...22