/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Python/ |
dup2.c | 9 * Check to see if fd2 is already open; if so, close it.
10 * Duplicate fd1 onto fd2; checking to make sure fd2 is a valid fd.
11 * Return fd2 if all went well; return BADEXIT otherwise.
20 dup2(int fd1, int fd2)
22 if (fd1 != fd2) {
25 if (fcntl(fd2, F_GETFL) >= 0)
26 close(fd2);
27 if (fcntl(fd1, F_DUPFD, fd2) < 0)
30 return fd2;
[all...] |
/external/python/cpython2/Python/ |
dup2.c | 9 * Check to see if fd2 is already open; if so, close it. 10 * Duplicate fd1 onto fd2; checking to make sure fd2 is a valid fd. 11 * Return fd2 if all went well; return BADEXIT otherwise. 20 dup2(int fd1, int fd2) 22 if (fd1 != fd2) { 25 if (fcntl(fd2, F_GETFL) >= 0) 26 close(fd2); 27 if (fcntl(fd1, F_DUPFD, fd2) < 0) 30 return fd2; [all...] |
/external/ltp/testcases/kernel/syscalls/eventfd2/ |
eventfd2_03.c | 80 static void sem_player(int fd1, int fd2) 85 fprintf(stdout, "[%u] waiting on %d\n", getpid(), fd2); 86 xsem_wait(fd2); 91 fprintf(stdout, "[%u] waiting on %d\n", getpid(), fd2); 92 xsem_wait(fd2); 97 fprintf(stdout, "[%u] waiting 5 times on %d\n", getpid(), fd2); 98 xsem_wait(fd2); 99 xsem_wait(fd2); 100 xsem_wait(fd2); 101 xsem_wait(fd2); 112 int c, fd1, fd2, status; local [all...] |
/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); 67 } else if (fd2 >= 0) { 68 *merged_fd = sync_merge("SyncMerge", fd2, fd2); 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); 67 } else if (fd2 >= 0) { 68 *merged_fd = sync_merge("SyncMerge", fd2, fd2); 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); 67 } else if (fd2 >= 0) { 68 *merged_fd = sync_merge("SyncMerge", fd2, fd2); 75 DLOGE("Sync merge error! fd1 %d fd2 %d", fd1, fd2);
|
/external/ltp/testcases/kernel/input/ |
input02.c | 39 static int fd2; variable 55 fd2 = open_device(); 64 if (no_events_queued(fd2)) 68 SAFE_CLOSE(NULL, fd2); 92 SAFE_IOCTL(NULL, fd2, EVIOCGRAB, 1); 100 SAFE_CLOSE(NULL, fd2);
|
input04.c | 37 static int fd, fd2; variable 60 if (no_events_queued(fd2)) 84 fd2 = open_device(); 99 if (fd2 > 0 && close(fd2)) 100 tst_resm(TWARN | TERRNO, "close(fd2)");
|
/external/strace/tests/ |
redirect-fds.test | 40 fd2="$LOG.fd2" 51 rm -f "$LOG" "$fd0" "$fd1" "$fd2" 64 check_fd "$fd0" "$fd1" "$fd2" 65 check_fd '' "$fd1" "$fd2" 66 check_fd "$fd0" '' "$fd2" 68 check_fd '' '' "$fd2"
|
/external/strace/tests-m32/ |
redirect-fds.test | 40 fd2="$LOG.fd2" 51 rm -f "$LOG" "$fd0" "$fd1" "$fd2" 64 check_fd "$fd0" "$fd1" "$fd2" 65 check_fd '' "$fd1" "$fd2" 66 check_fd "$fd0" '' "$fd2" 68 check_fd '' '' "$fd2"
|
/external/strace/tests-mx32/ |
redirect-fds.test | 40 fd2="$LOG.fd2" 51 rm -f "$LOG" "$fd0" "$fd1" "$fd2" 64 check_fd "$fd0" "$fd1" "$fd2" 65 check_fd '' "$fd1" "$fd2" 66 check_fd "$fd0" '' "$fd2" 68 check_fd '' '' "$fd2"
|
/external/compiler-rt/test/tsan/ |
fd_dup_norace2.cc | 44 int fd2 = open("/dev/urandom", O_RDONLY); local 45 if (fd == -1 || fd2 == -1) 49 if (dup2(fd2, fd) == -1) 54 if (close(fd2) == -1)
|
fd_dup_race.cc | 21 int fd2 = open("/dev/random", O_RDONLY); local 22 if (fd == -1 || fd2 == -1) 26 if (dup2(fd2, fd) == -1)
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/ |
8-1.c | 38 int fd1, fd2; local 47 fd2 = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); 48 if (fd2 == -1) { 57 if (fd2 == (fd1 + 1)) {
|
/external/ltp/testcases/kernel/syscalls/kcmp/ |
kcmp02.c | 39 static int fd2; variable 54 int *fd2; 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}, 71 fd2 = SAFE_OPEN(TEST_FILE2, O_CREAT | O_RDWR | O_TRUNC); 79 if (fd2 > 0) 80 SAFE_CLOSE(fd2); [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);
|
kcmp01.c | 37 static int fd2; variable 47 int *fd2; member in struct:test_case 51 {&pid2, &pid2, KCMP_FILE, &fd1, &fd2, 0}, 53 {&pid1, &pid2, KCMP_FILE, &fd1, &fd2, 0}, 74 fd2 = dup(fd1); 75 if (fd2 == -1) { 82 *(test->fd1), *(test->fd2))); 84 SAFE_CLOSE(fd2);
|
/external/libdrm/ |
libsync.h | 51 int32_t fd2; member in struct:sync_merge_data 86 static inline int sync_merge(const char *name, int fd1, int fd2) 91 data.fd2 = fd2; 104 /* accumulate fd2 into fd1. If *fd1 is not a valid fd then dup fd2, 121 static inline int sync_accumulate(const char *name, int *fd1, int fd2) 125 assert(fd2 >= 0); 128 *fd1 = dup(fd2); 132 ret = sync_merge(name, *fd1, fd2); [all...] |
/hardware/interfaces/tetheroffload/config/1.0/ |
IOffloadConfig.hal | 29 * @param fd2 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) 58 (fstat (fd2, &sbuf2) == 0) &&
|
/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 | 73 @param[in] fd2 79 virtual DisplayError SyncMerge(int fd1, int fd2, int *merged_fd) = 0;
|
/hardware/qcom/display/msm8998/sdm/include/core/ |
buffer_sync_handler.h | 73 @param[in] fd2 79 virtual DisplayError SyncMerge(int fd1, int fd2, int *merged_fd) = 0;
|
/hardware/qcom/display/sdm845/sdm/include/core/ |
buffer_sync_handler.h | 73 @param[in] fd2 79 virtual DisplayError SyncMerge(int fd1, int fd2, int *merged_fd) = 0;
|
/cts/hostsidetests/security/securityPatch/Bug-33863407/ |
poc.c | 41 int fd2 = -1; variable 61 fd2 = open(infopath, O_RDWR); 62 if(fd2 > 0) 64 close(fd2); 65 fd2 = -1;
|