/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Python/ |
dup2.c | 8 * Check to make sure that fd1 is a valid open file descriptor.
10 * Duplicate fd1 onto fd2; checking to make sure fd2 is a valid fd.
20 dup2(int fd1, int fd2)
22 if (fd1 != fd2) {
23 if (fcntl(fd1, F_GETFL) < 0)
27 if (fcntl(fd1, F_DUPFD, fd2) < 0)
|
/external/python/cpython2/Python/ |
dup2.c | 8 * Check to make sure that fd1 is a valid open file descriptor. 10 * Duplicate fd1 onto fd2; checking to make sure fd2 is a valid fd. 20 dup2(int fd1, int fd2) 22 if (fd1 != fd2) { 23 if (fcntl(fd1, F_GETFL) < 0) 27 if (fcntl(fd1, F_DUPFD, fd2) < 0)
|
/hardware/qcom/display/msm8996/sdm/libs/hwc/ |
hwc_buffer_sync_handler.cpp | 55 DisplayError HWCBufferSyncHandler::SyncMerge(int fd1, int fd2, int *merged_fd) { 63 if (fd1 >= 0 && fd2 >= 0) { 64 *merged_fd = sync_merge("SyncMerge", fd1, fd2); 65 } else if (fd1 >= 0) { 66 *merged_fd = sync_merge("SyncMerge", fd1, fd1); 75 DLOGE("Sync merge error! fd1 %d fd2 %d", fd1, fd2);
|
/hardware/qcom/display/msm8998/sdm/libs/hwc2/ |
hwc_buffer_sync_handler.cpp | 55 DisplayError HWCBufferSyncHandler::SyncMerge(int fd1, int fd2, int *merged_fd) { 63 if (fd1 >= 0 && fd2 >= 0) { 64 *merged_fd = sync_merge("SyncMerge", fd1, fd2); 65 } else if (fd1 >= 0) { 66 *merged_fd = sync_merge("SyncMerge", fd1, fd1); 75 DLOGE("Sync merge error! fd1 %d fd2 %d", fd1, fd2);
|
/hardware/qcom/display/sdm845/sdm/libs/hwc/ |
hwc_buffer_sync_handler.cpp | 55 DisplayError HWCBufferSyncHandler::SyncMerge(int fd1, int fd2, int *merged_fd) { 63 if (fd1 >= 0 && fd2 >= 0) { 64 *merged_fd = sync_merge("SyncMerge", fd1, fd2); 65 } else if (fd1 >= 0) { 66 *merged_fd = sync_merge("SyncMerge", fd1, fd1); 75 DLOGE("Sync merge error! fd1 %d fd2 %d", fd1, fd2);
|
/external/ltp/testcases/kernel/syscalls/kcmp/ |
kcmp01.c | 36 static int fd1; variable 46 int *fd1; member in struct:test_case 50 {&pid1, &pid1, KCMP_FILE, &fd1, &fd1, 0}, 51 {&pid2, &pid2, KCMP_FILE, &fd1, &fd2, 0}, 52 {&pid1, &pid2, KCMP_FILE, &fd1, &fd1, 0}, 53 {&pid1, &pid2, KCMP_FILE, &fd1, &fd2, 0}, 54 {&pid1, &pid2, KCMP_FILE, &fd1, &fd3, 1}, 59 fd1 = SAFE_OPEN(TEST_FILE, O_CREAT | O_RDWR | O_TRUNC) [all...] |
kcmp02.c | 38 static int fd1; variable 53 int *fd1; member in struct:test_case 57 {&pid1, &pid_unused, KCMP_FILE, &fd1, &fd2, ESRCH}, 58 {&pid1, &pid1, KCMP_TYPES + 1, &fd1, &fd2, EINVAL}, 59 {&pid1, &pid1, -1, &fd1, &fd2, EINVAL}, 60 {&pid1, &pid1, INT_MIN, &fd1, &fd2, EINVAL}, 61 {&pid1, &pid1, INT_MAX, &fd1, &fd2, EINVAL}, 62 {&pid1, &pid1, KCMP_FILE, &fd1, &fd_fake, EBADF} 70 fd1 = SAFE_OPEN(TEST_FILE, O_CREAT | O_RDWR | O_TRUNC); 76 if (fd1 > 0 [all...] |
kcmp.h | 47 int kcmp(int pid1, int pid2, int type, int fd1, int fd2) 49 return tst_syscall(__NR_kcmp, pid1, pid2, type, fd1, fd2);
|
/external/strace/tests/ |
redirect-fds.test | 39 fd1="$LOG.fd1" 51 rm -f "$LOG" "$fd0" "$fd1" "$fd2" 64 check_fd "$fd0" "$fd1" "$fd2" 65 check_fd '' "$fd1" "$fd2" 67 check_fd "$fd0" "$fd1" '' 69 check_fd '' "$fd1" ''
|
/external/strace/tests-m32/ |
redirect-fds.test | 39 fd1="$LOG.fd1" 51 rm -f "$LOG" "$fd0" "$fd1" "$fd2" 64 check_fd "$fd0" "$fd1" "$fd2" 65 check_fd '' "$fd1" "$fd2" 67 check_fd "$fd0" "$fd1" '' 69 check_fd '' "$fd1" ''
|
/external/strace/tests-mx32/ |
redirect-fds.test | 39 fd1="$LOG.fd1" 51 rm -f "$LOG" "$fd0" "$fd1" "$fd2" 64 check_fd "$fd0" "$fd1" "$fd2" 65 check_fd '' "$fd1" "$fd2" 67 check_fd "$fd0" "$fd1" '' 69 check_fd '' "$fd1" ''
|
/external/ltp/testcases/kernel/syscalls/pwritev/ |
pwritev02.c | 46 static int fd1; variable 72 {&fd1, wr_iovec1, 1, 0, EINVAL}, 73 {&fd1, wr_iovec2, -1, 0, EINVAL}, 74 {&fd1, wr_iovec2, 1, -1, EINVAL}, 75 {&fd1, wr_iovec3, 1, 0, EFAULT}, 102 fd1 = SAFE_OPEN("file", O_RDWR | O_CREAT, 0644); 103 SAFE_FTRUNCATE(fd1, getpagesize()); 110 if (fd1 > 0) 111 SAFE_CLOSE(fd1);
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/ |
8-1.c | 38 int fd1, fd2; local 41 fd1 = mkstemp(path); 42 if (fd1 == -1) { 57 if (fd2 == (fd1 + 1)) {
|
/external/ltp/testcases/kernel/syscalls/eventfd2/ |
eventfd2_03.c | 80 static void sem_player(int fd1, int fd2) 82 fprintf(stdout, "[%u] posting 1 on %d\n", getpid(), fd1); 83 xsem_post(fd1, 1); 88 fprintf(stdout, "[%u] posting 1 on %d\n", getpid(), fd1); 89 xsem_post(fd1, 1); 94 fprintf(stdout, "[%u] posting 5 on %d\n", getpid(), fd1); 95 xsem_post(fd1, 5); 112 int c, fd1, fd2, status; local 127 if ((fd1 = eventfd2(0, EFD_SEMLIKE)) == -1 || 133 sem_player(fd1, fd2) [all...] |
/external/libdrm/ |
libsync.h | 86 static inline int sync_merge(const char *name, int fd1, int fd2) 95 ret = ioctl(fd1, SYNC_IOC_MERGE, &data); 104 /* accumulate fd2 into fd1. If *fd1 is not a valid fd then dup fd2, 105 * otherwise sync_merge() and close the old *fd1. This can be used 121 static inline int sync_accumulate(const char *name, int *fd1, int fd2) 127 if (*fd1 < 0) { 128 *fd1 = dup(fd2); 132 ret = sync_merge(name, *fd1, fd2); 134 /* leave *fd1 as it is * [all...] |
/hardware/interfaces/tetheroffload/config/1.0/ |
IOffloadConfig.hal | 27 * @param fd1 A file descriptor bound to the following netlink groups 35 setHandles(handle fd1, handle fd2) generates (bool success, string errMsg);
|
/toolchain/binutils/binutils-2.25/libiberty/ |
fdmatch.c | 23 @deftypefn Extension int fdmatch (int @var{fd1}, int @var{fd2}) 52 int fdmatch (int fd1, int fd2) 57 if ((fstat (fd1, &sbuf1) == 0) &&
|
/external/ltp/testcases/kernel/syscalls/preadv/ |
preadv02.c | 48 static int fd1; variable 75 {&fd1, rd_iovec1, 1, 0, EINVAL}, 76 {&fd1, rd_iovec2, -1, 0, EINVAL}, 77 {&fd1, rd_iovec2, 1, -1, EINVAL}, 78 {&fd1, rd_iovec3, 1, 0, EFAULT}, 107 fd1 = SAFE_OPEN("file1", O_RDWR | O_CREAT, 0644); 108 SAFE_FTRUNCATE(fd1, getpagesize()); 116 if (fd1 > 0) 117 SAFE_CLOSE(fd1);
|
/external/linux-kselftest/tools/testing/selftests/sync/ |
sync.h | 36 int sync_merge(const char *name, int fd1, int fd2);
|
/hardware/qcom/display/msm8996/sdm/include/core/ |
buffer_sync_handler.h | 72 @param[in] fd1 79 virtual DisplayError SyncMerge(int fd1, int fd2, int *merged_fd) = 0;
|
/hardware/qcom/display/msm8998/sdm/include/core/ |
buffer_sync_handler.h | 72 @param[in] fd1 79 virtual DisplayError SyncMerge(int fd1, int fd2, int *merged_fd) = 0;
|
/hardware/qcom/display/sdm845/sdm/include/core/ |
buffer_sync_handler.h | 72 @param[in] fd1 79 virtual DisplayError SyncMerge(int fd1, int fd2, int *merged_fd) = 0;
|
/external/linux-kselftest/tools/testing/selftests/kcmp/ |
kcmp_test.c | 22 static long sys_kcmp(int pid1, int pid2, int type, int fd1, int fd2) 24 return syscall(__NR_kcmp, pid1, pid2, type, fd1, fd2); 31 int fd1, fd2; local 34 fd1 = open(kpath, O_RDWR | O_CREAT | O_TRUNC, 0644); 37 if (fd1 < 0) { 63 sys_kcmp(pid1, pid2, KCMP_FILE, fd1, fd2), 75 ret = sys_kcmp(pid1, pid2, KCMP_FILE, fd1, fd1);
|
/external/ltp/testcases/kernel/syscalls/flistxattr/ |
flistxattr02.c | 46 static int fd1; variable 54 {&fd1, 1, ERANGE}, 83 fd1 = SAFE_OPEN("testfile", O_RDWR | O_CREAT, 0644); 85 SAFE_FSETXATTR(fd1, SECURITY_KEY, VALUE, VALUE_SIZE, XATTR_CREATE); 90 if (fd1 > 0) 91 SAFE_CLOSE(fd1);
|
/external/ltp/testcases/kernel/syscalls/flock/ |
flock05.c | 86 int fd, fd1, status; variable 111 fd1 = open(filename, O_RDWR); 112 retval = flock(fd1, LOCK_SH | LOCK_NB); 132 fd1 = open(filename, O_RDWR); 133 retval = flock(fd1, LOCK_EX | LOCK_NB); 157 close(fd1);
|