/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/ |
18-1.c | 43 int fd; local 56 fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); 58 if (fd == -1) { 69 close(fd); 76 aiocbs[0]->aio_fildes = fd; 92 close(fd); 103 close(fd); 109 close(fd);
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mlockall/ |
3-6.c | 36 int result, fd; local 45 fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); 46 if (fd == -1) { 51 if (ftruncate(fd, BUF_SIZE) != 0) { 57 foo = mmap(NULL, BUF_SIZE, PROT_WRITE, MAP_SHARED, fd, 0);
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/mmap/ |
10-1.c | 44 int fd; local 51 fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); 52 if (fd == -1) { 57 if (ftruncate(fd, total_size) == -1) { 63 pa = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 84 close(fd);
|
11-1.c | 45 int fd, saved_errno; local 54 fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); 55 if (fd == -1) { 61 if (ftruncate(fd, total_size) == -1) { 71 pa = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, off); 75 close(fd);
|
11-4.c | 52 int fd; local 68 fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, 70 if (fd == -1) { 74 if (ftruncate(fd, len) == -1) { 79 pa = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); 97 close(fd); 117 fd = open(tmpfname, O_RDWR, 0); 120 pa = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); 131 close(fd);
|
24-1.c | 40 int fd; local 51 fd = shm_open(tmpfname, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); 52 if (fd == -1) { 58 if (ftruncate(fd, shm_size) == -1) { 67 pa = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); 80 close(fd);
|
24-2.c | 40 int fd; local 52 fd = shm_open(tmpfname, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); 53 if (fd == -1) { 58 if (ftruncate(fd, shm_size) == -1) { 72 pa = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); 94 pa = mmap(addr, len, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, fd, 105 close(fd);
|
27-1.c | 40 int fd, err = 0; local 44 fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); 45 if (fd == -1) { 53 if (ftruncate(fd, total_size) == -1) { 59 pa = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); 74 pa = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); 80 pa = mmap(pa, len / 2, PROT_READ, MAP_SHARED | MAP_FIXED, fd, 0);
|
31-1.c | 46 int fd; local 71 fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); 72 if (fd == -1) { 93 pa = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, off); 105 close(fd);
|
6-1.c | 48 int fd; local 56 fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); 57 if (fd == -1) { 67 if (ftruncate(fd, size) == -1) { 72 pa = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); 90 close(fd);
|
6-2.c | 50 int fd; local 58 fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); 59 if (fd == -1) { 69 if (write(fd, data, size) != size) { 74 pa = mmap(NULL, size, PROT_NONE, MAP_SHARED, fd, 0); 96 close(fd);
|
6-3.c | 49 int fd; local 57 fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); 58 if (fd == -1) { 67 pa = mmap(NULL, size, PROT_NONE, MAP_SHARED, fd, 0); 86 close(fd);
|
7-3.c | 47 int fd; local 54 fd = shm_open(tmpfname, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); 55 if (fd == -1) { 61 if (ftruncate(fd, size) == -1) { 66 pa = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); 80 pa = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 105 close(fd);
|
9-1.c | 44 int fd, saved_errno; local 53 fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); 54 if (fd == -1) { 59 if (ftruncate(fd, total_size) == -1) { 65 pa = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); 78 pa = mmap(illegal_addr, size, PROT_READ | PROT_WRITE, MAP_FIXED, fd, 0); 82 close(fd);
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_init/ |
3-2.c | 93 int fd; local 101 fd = shm_open("/sem_init_3-2", O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); 103 if (fd == -1) { 108 ret = ftruncate(fd, sysconf(_SC_PAGESIZE)); 117 MAP_SHARED, fd, 0);
|
3-3.c | 93 int fd; local 101 fd = shm_open("/sem_init_3-2", O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); 103 if (fd == -1) { 108 ret = ftruncate(fd, sysconf(_SC_PAGESIZE)); 117 MAP_SHARED, fd, 0);
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/ |
18-1.c | 41 int fd, result; local 54 fd = shm_open(SHM_NAME, O_RDONLY | O_CREAT, MOD_FLAGS); 55 if (fd == -1) { 60 result = fstat(fd, &stat_buf);
|
26-2.c | 41 int fd; local 48 fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, 52 if (fd == -1) { 57 if (ftruncate(fd, BUF_SIZE) != 0) { 63 if (fstat(fd, &stat_buf) != 0) { 96 fd = shm_open(SHM_NAME, O_RDWR | O_TRUNC, 0); 97 if (fd == -1) { 104 if (fstat(fd, &stat_buf) != 0) {
|
5-1.c | 49 int fd; local 52 fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); 53 if (fd == -1) { 59 if (ftruncate(fd, BUF_SIZE) != 0) { 65 buf = mmap(NULL, BUF_SIZE, PROT_WRITE, MAP_SHARED, fd, 0); 79 int fd, child_pid; local 92 fd = shm_open(SHM_NAME, O_RDONLY, S_IRUSR | S_IWUSR); 93 if (fd == -1) { 98 buf = mmap(NULL, BUF_SIZE, PROT_READ, MAP_SHARED, fd, 0);
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/ |
8-1.c | 39 int fd, result; local 43 fd = shm_open(SHM_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); 44 if (fd == -1) { 49 if (ftruncate(fd, BUF_SIZE) != 0) { 55 if (fstat(fd, &stat_before) != 0) { 92 if (fstat(fd, &stat_after) != 0) {
|
/external/perfetto/src/base/ |
file_utils.cc | 34 base::ScopedFile fd = base::OpenFile(path.c_str(), O_RDONLY); local 35 if (!fd) 39 if (fstat(*fd, &buf) != -1) { 49 bytes_read = PERFETTO_EINTR(read(fd.get(), &((*out)[i]), kBufSize));
|
temp_file_unittest.cc | 35 int fd; local 39 fd = tf.fd(); 41 ASSERT_GE(fd, 0); 43 ASSERT_GE(write(fd, "foo", 4), 0); 47 ASSERT_EQ(-1, tf.fd()); 49 ASSERT_EQ(fd, moved_tf.fd()); 50 ASSERT_GE(write(moved_tf.fd(), "foo", 4), 0); 54 ASSERT_EQ(-1, moved_tf.fd()); 67 int fd; local 79 ScopedFile fd; local 88 ScopedFile fd; local [all...] |
/external/perfetto/src/tracing/ipc/ |
posix_shared_memory.h | 46 int fd() const { return fd_.get(); } function in class:perfetto::PosixSharedMemory
|
posix_shared_memory_unittest.cc | 37 bool IsFileDescriptorClosed(int fd) { 38 return lseek(fd, 0, SEEK_CUR) == -1 && errno == EBADF; 60 int fd = shm->fd(); local 61 ASSERT_GE(fd, 0); 62 ASSERT_EQ(static_cast<off_t>(base::kPageSize), lseek(fd, 0, SEEK_END)); 65 ASSERT_TRUE(IsFileDescriptorClosed(fd)); 70 const int fd_num = tmp_file.fd();
|
/external/selinux/libselinux/src/ |
canonicalize_context.c | 18 int fd, ret; local 26 fd = open(path, O_RDWR | O_CLOEXEC); 27 if (fd < 0) 38 ret = write(fd, buf, strlen(buf) + 1); 43 ret = read(fd, buf, size - 1); 59 close(fd);
|