/external/ltp/testcases/kernel/syscalls/eventfd2/ |
D | eventfd2_03.c | 80 static void sem_player(int fd1, int fd2) in sem_player() argument 85 fprintf(stdout, "[%u] waiting on %d\n", getpid(), fd2); in sem_player() 86 xsem_wait(fd2); in sem_player() 91 fprintf(stdout, "[%u] waiting on %d\n", getpid(), fd2); in sem_player() 92 xsem_wait(fd2); in sem_player() 97 fprintf(stdout, "[%u] waiting 5 times on %d\n", getpid(), fd2); in sem_player() 98 xsem_wait(fd2); in sem_player() 99 xsem_wait(fd2); in sem_player() 100 xsem_wait(fd2); in sem_player() 101 xsem_wait(fd2); in sem_player() [all …]
|
/external/ltp/testcases/kernel/syscalls/memfd_create/ |
D | memfd_create01.c | 139 int fd2; in test_share_dup() local 143 fd2 = SAFE_DUP(fd); in test_share_dup() 144 CHECK_MFD_HAS_SEALS(fd2, 0); in test_share_dup() 148 CHECK_MFD_HAS_SEALS(fd2, F_SEAL_WRITE); in test_share_dup() 150 CHECK_MFD_ADD_SEALS(fd2, F_SEAL_SHRINK); in test_share_dup() 152 CHECK_MFD_HAS_SEALS(fd2, F_SEAL_WRITE | F_SEAL_SHRINK); in test_share_dup() 156 CHECK_MFD_HAS_SEALS(fd2, F_SEAL_WRITE | F_SEAL_SHRINK | F_SEAL_SEAL); in test_share_dup() 159 CHECK_MFD_FAIL_ADD_SEALS(fd2, F_SEAL_GROW); in test_share_dup() 161 CHECK_MFD_FAIL_ADD_SEALS(fd2, F_SEAL_SEAL); in test_share_dup() 163 SAFE_CLOSE(fd2); in test_share_dup() [all …]
|
/external/ltp/testcases/kernel/syscalls/kcmp/ |
D | kcmp02.c | 39 static int fd2; variable 54 int *fd2; member 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); in setup() 79 if (fd2 > 0) in cleanup() 80 SAFE_CLOSE(fd2); in cleanup() [all …]
|
D | kcmp01.c | 37 static int fd2; variable 47 int *fd2; member 51 {&pid2, &pid2, KCMP_FILE, &fd1, &fd2, 0}, 53 {&pid1, &pid2, KCMP_FILE, &fd1, &fd2, 0}, 74 fd2 = dup(fd1); in do_child() 75 if (fd2 == -1) { in do_child() 82 *(test->fd1), *(test->fd2))); in do_child() 84 SAFE_CLOSE(fd2); in do_child()
|
/external/clang/test/Sema/ |
D | zvector.c | 21 vector double fd, fd2; variable 61 fd = fd2; in foo() 80 sc = fd2; // expected-error {{incompatible type}} in foo() 90 uc = fd2; // expected-error {{incompatible type}} in foo() 100 bc = fd2; // expected-error {{incompatible type}} in foo() 125 ul = (vector unsigned long long)fd2; in foo() 134 uc = (vector unsigned char)fd2; in foo() 138 us = (vector unsigned short)fd2; in foo() 142 ui = (vector unsigned int)fd2; in foo() 169 ++fd2; in foo() [all …]
|
/external/libdrm/ |
D | libsync.h | 51 int32_t fd2; member 86 static inline int sync_merge(const char *name, int fd1, int fd2) in sync_merge() argument 91 data.fd2 = fd2; in sync_merge() 121 static inline int sync_accumulate(const char *name, int *fd1, int fd2) in sync_accumulate() argument 125 assert(fd2 >= 0); in sync_accumulate() 128 *fd1 = dup(fd2); in sync_accumulate() 132 ret = sync_merge(name, *fd1, fd2); in sync_accumulate()
|
/external/python/cpython3/Python/ |
D | dup2.c | 20 dup2(int fd1, int fd2) in dup2() argument 22 if (fd1 != fd2) { in dup2() 25 if (fcntl(fd2, F_GETFL) >= 0) in dup2() 26 close(fd2); in dup2() 27 if (fcntl(fd1, F_DUPFD, fd2) < 0) in dup2() 30 return fd2; in dup2()
|
/external/python/cpython2/Python/ |
D | dup2.c | 20 dup2(int fd1, int fd2) in dup2() argument 22 if (fd1 != fd2) { in dup2() 25 if (fcntl(fd2, F_GETFL) >= 0) in dup2() 26 close(fd2); in dup2() 27 if (fcntl(fd1, F_DUPFD, fd2) < 0) in dup2() 30 return fd2; in dup2()
|
/external/linux-kselftest/tools/testing/selftests/memfd/ |
D | memfd_test.c | 404 int r, fd2; in mfd_assert_shrink() local 414 fd2 = mfd_assert_open(fd, in mfd_assert_shrink() 417 close(fd2); in mfd_assert_shrink() 779 int fd, fd2; in test_share_dup() local 788 fd2 = mfd_assert_dup(fd); in test_share_dup() 789 mfd_assert_has_seals(fd2, 0); in test_share_dup() 793 mfd_assert_has_seals(fd2, F_SEAL_WRITE); in test_share_dup() 795 mfd_assert_add_seals(fd2, F_SEAL_SHRINK); in test_share_dup() 797 mfd_assert_has_seals(fd2, F_SEAL_WRITE | F_SEAL_SHRINK); in test_share_dup() 801 mfd_assert_has_seals(fd2, F_SEAL_WRITE | F_SEAL_SHRINK | F_SEAL_SEAL); in test_share_dup() [all …]
|
/external/ltp/testcases/kernel/syscalls/dup2/ |
D | dup203.c | 62 int fd0, fd1, fd2, rval; in main() local 104 if ((fd2 = TEST_RETURN) == -1) { in main() 107 if (fd1 != fd2) { in main() 113 if (read(fd2, buf, sizeof(buf)) == -1) in main() 122 close(fd2); in main() 143 if ((fd2 = creat(filename1, 0666)) == -1) { in main() 148 rval = fd2; in main() 151 TEST(dup2(fd0, fd2)); in main() 156 if (fd1 != fd2) { in main()
|
/external/strace/tests-m32/ |
D | 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/ |
D | 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/ |
D | 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/ltp/testcases/kernel/syscalls/fcntl/ |
D | fcntl01.c | 48 int fd[10], fd2[10]; in main() local 67 fd2[i] = fd[i]; in main() 78 if (fd[2] < fd2[2]) in main() 82 if ((fd[4] = fcntl(fd[1], F_DUPFD, fd2[3])) < 0) in main() 85 if (fd[4] < fd2[3]) in main() 87 "expect greater than %d", fd[4], fd2[3]); in main() 89 if ((fd[8] = fcntl(fd[1], F_DUPFD, fd2[5])) < 0) in main() 92 if (fd[8] != fd2[5]) in main() 94 "got %d, expected %d", fd[8], fd2[5]); in main()
|
D | fcntl32.c | 36 static int fd2; variable 102 fd2 = SAFE_OPEN(cleanup, "file", test_cases[i].fd2_flag); in verify_fcntl() 124 SAFE_CLOSE(cleanup, fd2); in verify_fcntl() 125 fd2 = 0; in verify_fcntl() 133 if (fd2 > 0 && close(fd2)) in cleanup()
|
/external/libdrm/tests/nouveau/ |
D | threaded.c | 74 int err, fd, fd2; in main() local 84 fd2 = drmOpenWithType("nouveau", NULL, DRM_NODE_RENDER); in main() 90 fd2 = open(device, O_RDWR); in main() 92 fd2 = fd = -errno; in main() 100 if (fd2 < 0) { in main() 118 err = nouveau_device_wrap(fd2, 0, &nvdev2); in main() 140 close(fd2); in main() 143 drmClose(fd2); in main()
|
/external/ltp/testcases/kernel/input/ |
D | input02.c | 39 static int fd2; variable 55 fd2 = open_device(); in main() 64 if (no_events_queued(fd2, 0)) in main() 68 SAFE_CLOSE(NULL, fd2); in main() 92 SAFE_IOCTL(NULL, fd2, EVIOCGRAB, 1); in send_information() 100 SAFE_CLOSE(NULL, fd2); in send_information()
|
D | input04.c | 37 static int fd, fd2; variable 60 if (no_events_queued(fd2, 1)) in main() 84 fd2 = open_device(); in setup() 99 if (fd2 > 0 && close(fd2)) in cleanup()
|
/external/ltp/testcases/kernel/syscalls/lseek/ |
D | lseek07.c | 36 static int fd1, fd2; variable 46 {&fd2, TFILE2, 2, 2, 7, "abijkfg"}, 89 fd2 = SAFE_OPEN(TFILE2, O_RDWR | O_CREAT, 0644); in setup() 92 SAFE_WRITE(1, fd2, WR_STR1, sizeof(WR_STR1) - 1); in setup() 100 if (fd2 > 0) in cleanup() 101 SAFE_CLOSE(fd2); in cleanup()
|
/external/ltp/testcases/kernel/syscalls/flock/ |
D | flock06.c | 24 int fd1, fd2; in verify_flock() local 33 fd2 = SAFE_OPEN("testfile", O_RDWR); in verify_flock() 34 TEST(flock(fd2, LOCK_EX | LOCK_NB)); in verify_flock() 46 TEST(flock(fd2, LOCK_EX | LOCK_NB)); in verify_flock() 53 SAFE_CLOSE(fd2); in verify_flock()
|
D | flock03.c | 26 int fd2; in childfunc() local 29 fd2 = SAFE_OPEN("testfile", O_RDWR); in childfunc() 30 if (flock(fd2, LOCK_EX | LOCK_NB) != -1) in childfunc() 42 TEST(flock(fd2, LOCK_EX | LOCK_NB)); in childfunc() 52 SAFE_CLOSE(fd2); in childfunc()
|
D | flock04.c | 48 int fd2; in verify_flock() local 52 fd2 = SAFE_OPEN("testfile", O_RDWR); in verify_flock() 53 TEST(flock(fd2, tc->operation)); in verify_flock() 57 SAFE_CLOSE(fd2); in verify_flock() 75 SAFE_CLOSE(fd2); in verify_flock()
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mmap/ |
D | 3-1.c | 49 int fd2; in main() local 69 fd2 = open(tmpfname2, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); in main() 70 if (fd == -1 || fd2 == -1) { in main() 87 if (write(fd2, data, total_size) != total_size) { in main() 109 mmap(pa, size2, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED, fd2, in main() 129 close(fd2); in main()
|
/external/ltp/testcases/kernel/io/direct_io/ |
D | diotest1.c | 57 static int fd1, fd2; variable 73 if (fd2 > 0) in cleanup() 74 close(fd2); in cleanup() 130 fd2 = SAFE_OPEN(cleanup, outfile, O_DIRECT | O_RDWR | O_CREAT, 0666); in main() 148 SAFE_LSEEK(cleanup, fd2, offset, SEEK_SET); in main() 150 SAFE_WRITE(cleanup, 1, fd2, buf, n); in main()
|
/external/linux-kselftest/tools/testing/selftests/kcmp/ |
D | kcmp_test.c | 23 static long sys_kcmp(int pid1, int pid2, int type, unsigned long fd1, unsigned long fd2) in sys_kcmp() argument 25 return syscall(__NR_kcmp, pid1, pid2, type, fd1, fd2); in sys_kcmp() 37 int fd1, fd2; in main() local 91 fd2 = open(kpath, O_RDWR); in main() 92 if (fd2 < 0) { in main() 102 sys_kcmp(pid1, pid2, KCMP_FILE, fd1, fd2), in main()
|