/external/linux-kselftest/tools/testing/selftests/memfd/ |
D | memfd_test.c | 39 int r, fd; in mfd_assert_new() local 41 fd = sys_memfd_create(name, flags); in mfd_assert_new() 42 if (fd < 0) { in mfd_assert_new() 48 r = ftruncate(fd, sz); in mfd_assert_new() 54 return fd; in mfd_assert_new() 59 int r, fd; in mfd_assert_reopen_fd() local 62 sprintf(path, "/proc/self/fd/%d", fd_in); in mfd_assert_reopen_fd() 64 fd = open(path, O_RDWR); in mfd_assert_reopen_fd() 65 if (fd < 0) { in mfd_assert_reopen_fd() 66 printf("re-open of existing fd %d failed\n", fd_in); in mfd_assert_reopen_fd() [all …]
|
/external/ltp/testcases/kernel/syscalls/memfd_create/ |
D | memfd_create01.c | 22 static void test_basic(int fd) in test_basic() argument 25 CHECK_MFD_HAS_SEALS(fd, 0); in test_basic() 26 CHECK_MFD_ADD_SEALS(fd, F_SEAL_SHRINK | F_SEAL_WRITE); in test_basic() 27 CHECK_MFD_HAS_SEALS(fd, F_SEAL_SHRINK | F_SEAL_WRITE); in test_basic() 30 CHECK_MFD_ADD_SEALS(fd, F_SEAL_SHRINK | F_SEAL_WRITE); in test_basic() 31 CHECK_MFD_HAS_SEALS(fd, F_SEAL_SHRINK | F_SEAL_WRITE); in test_basic() 34 CHECK_MFD_ADD_SEALS(fd, F_SEAL_GROW | F_SEAL_SEAL); in test_basic() 35 CHECK_MFD_HAS_SEALS(fd, F_SEAL_SHRINK | F_SEAL_GROW | in test_basic() 39 CHECK_MFD_FAIL_ADD_SEALS(fd, F_SEAL_GROW); in test_basic() 40 CHECK_MFD_FAIL_ADD_SEALS(fd, 0); in test_basic() [all …]
|
D | memfd_create_common.h | 41 #define CHECK_MMAP(addr, length, prot, flags, fd, offset) \ argument 43 (flags), (fd), (offset)) 45 #define CHECK_MMAP_FAIL(addr, length, prot, flags, fd, offset) \ argument 47 (flags), (fd), (offset)) 52 #define CHECK_MFD_HAS_SEALS(fd, seals) \ argument 53 check_mfd_has_seals(__FILE__, __LINE__, (fd), (seals)); 55 #define CHECK_MFD_ADD_SEALS(fd, seals) \ argument 56 ({int r = SAFE_FCNTL((fd), F_ADD_SEALS, (seals)); \ 58 (fd), (seals)); r; }) 60 #define CHECK_MFD_FAIL_ADD_SEALS(fd, seals) \ argument [all …]
|
D | memfd_create_common.c | 32 int check_fallocate(const char *filename, const int lineno, int fd, in check_fallocate() argument 37 r = fallocate(fd, mode, offset, len); in check_fallocate() 40 "fallocate(%d, %d, %ld, %ld) failed", fd, mode, in check_fallocate() 45 "fallocate(%d, %d, %ld, %ld) succeeded", fd, mode, in check_fallocate() 51 int check_fallocate_fail(const char *filename, const int lineno, int fd, in check_fallocate_fail() argument 56 r = fallocate(fd, mode, offset, len); in check_fallocate_fail() 60 fd, mode, offset, len); in check_fallocate_fail() 66 "fallocate(%d, %d, %ld, %ld) failed as expected", fd, in check_fallocate_fail() 72 void check_ftruncate(const char *filename, const int lineno, int fd, in check_ftruncate() argument 75 safe_ftruncate(filename, lineno, fd, length); in check_ftruncate() [all …]
|
/external/igt-gpu-tools/tests/i915/ |
D | gem_eio.c | 55 int fd, ret; in i915_reset_control() local 59 fd = open(path, O_RDWR); in i915_reset_control() 60 igt_require(fd >= 0); in i915_reset_control() 62 ret = write(fd, &"01"[enable], 1) == 1; in i915_reset_control() 63 close(fd); in i915_reset_control() 68 static void trigger_reset(int fd) in trigger_reset() argument 75 igt_force_gpu_reset(fd); in trigger_reset() 79 gem_test_engine(fd, ALL_ENGINES); in trigger_reset() 80 igt_drop_caches_set(fd, DROP_ACTIVE); in trigger_reset() 95 static void wedge_gpu(int fd) in wedge_gpu() argument [all …]
|
D | gem_reset_stats.c | 71 int fd = drm_open_driver(DRIVER_INTEL); in sync_gpu() local 72 gem_quiescent_gpu(fd); in sync_gpu() 73 close(fd); in sync_gpu() 76 static int noop(int fd, uint32_t ctx, const struct intel_execution_engine *e) in noop() argument 84 exec.handle = gem_create(fd, 4096); in noop() 86 gem_write(fd, exec.handle, 0, &bbe, sizeof(bbe)); in noop() 94 ret = __gem_execbuf(fd, &eb); in noop() 96 gem_close(fd, exec.handle); in noop() 103 static int has_engine(int fd, in has_engine() argument 107 int handle = noop(fd, ctx, e); in has_engine() [all …]
|
D | gem_exec_schedule.c | 67 uint32_t __sync_read_u32(int fd, uint32_t handle, uint64_t offset) in __sync_read_u32() argument 71 gem_set_domain(fd, handle, /* No write hazard lies! */ in __sync_read_u32() 73 gem_read(fd, handle, offset, &value, sizeof(value)); in __sync_read_u32() 79 void __sync_read_u32_count(int fd, uint32_t handle, uint32_t *dst, uint64_t size) in __sync_read_u32_count() argument 81 gem_set_domain(fd, handle, /* No write hazard lies! */ in __sync_read_u32_count() 83 gem_read(fd, handle, 0, dst, size); in __sync_read_u32_count() 86 static uint32_t __store_dword(int fd, uint32_t ctx, unsigned ring, in __store_dword() argument 90 const int gen = intel_gen(intel_get_drm_devid(fd)); in __store_dword() 108 obj[2].handle = gem_create(fd, 4096); in __store_dword() 135 gem_write(fd, obj[2].handle, 0, batch, sizeof(batch)); in __store_dword() [all …]
|
D | gem_mmap_wc.c | 59 local_gem_mmap__wc(int fd, uint32_t handle, uint64_t offset, uint64_t size, unsigned prot) in local_gem_mmap__wc() argument 63 ptr = __gem_mmap__wc(fd, handle, 0, OBJECT_SIZE, PROT_READ | PROT_WRITE); in local_gem_mmap__wc() 69 static void set_domain(int fd, uint32_t handle) in set_domain() argument 71 gem_set_domain(fd, handle, I915_GEM_DOMAIN_WC, I915_GEM_DOMAIN_WC); in set_domain() 75 mmap_bo(int fd, uint32_t handle) in mmap_bo() argument 79 ptr = local_gem_mmap__wc(fd, handle, 0, OBJECT_SIZE, PROT_READ | PROT_WRITE); in mmap_bo() 85 create_pointer(int fd) in create_pointer() argument 90 handle = gem_create(fd, OBJECT_SIZE); in create_pointer() 92 ptr = mmap_bo(fd, handle); in create_pointer() 93 set_domain(fd, handle); in create_pointer() [all …]
|
D | gem_wait.c | 31 static int __gem_wait(int fd, struct drm_i915_gem_wait *w) in __gem_wait() argument 36 if (igt_ioctl(fd, DRM_IOCTL_I915_GEM_WAIT, w)) in __gem_wait() 42 static void invalid_flags(int fd) in invalid_flags() argument 47 wait.bo_handle = gem_create(fd, 4096); in invalid_flags() 54 igt_assert_eq(__gem_wait(fd, &wait), -EINVAL); in invalid_flags() 56 gem_close(fd, wait.bo_handle); in invalid_flags() 59 static void invalid_buf(int fd) in invalid_buf() argument 64 igt_assert_eq(__gem_wait(fd, &wait), -ENOENT); in invalid_buf() 72 static void basic(int fd, unsigned engine, unsigned flags) in basic() argument 76 flags & (WRITE | AWAIT) ? igt_cork_plug(&cork, fd) : 0; in basic() [all …]
|
D | gem_sync.c | 82 sync_ring(int fd, unsigned ring, int num_children, int timeout) in sync_ring() argument 89 for_each_physical_engine(fd, ring) { in sync_ring() 98 gem_require_ring(fd, ring); in sync_ring() 103 intel_detect_and_clear_missed_interrupts(fd); in sync_ring() 112 object.handle = gem_create(fd, 4096); in sync_ring() 113 gem_write(fd, object.handle, 0, &bbe, sizeof(bbe)); in sync_ring() 119 gem_execbuf(fd, &execbuf); in sync_ring() 120 gem_sync(fd, object.handle); in sync_ring() 126 gem_execbuf(fd, &execbuf); in sync_ring() 127 gem_sync(fd, object.handle); in sync_ring() [all …]
|
D | gem_exec_fence.c | 60 static void store(int fd, unsigned ring, int fence, uint32_t target, unsigned offset_value) in store() argument 64 const int gen = intel_gen(intel_get_drm_devid(fd)); in store() 82 obj[BATCH].handle = gem_create(fd, 4096); in store() 108 gem_write(fd, obj[BATCH].handle, 0, batch, sizeof(batch)); in store() 109 gem_execbuf(fd, &execbuf); in store() 110 gem_close(fd, obj[BATCH].handle); in store() 122 static void test_fence_busy(int fd, unsigned ring, unsigned flags) in test_fence_busy() argument 124 const int gen = intel_gen(intel_get_drm_devid(fd)); in test_fence_busy() 132 gem_quiescent_gpu(fd); in test_fence_busy() 140 obj.handle = gem_create(fd, 4096); in test_fence_busy() [all …]
|
D | gem_mmap_gtt.c | 53 set_domain_gtt(int fd, uint32_t handle) in set_domain_gtt() argument 55 gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT); in set_domain_gtt() 59 mmap_bo(int fd, uint32_t handle) in mmap_bo() argument 63 ptr = gem_mmap__gtt(fd, handle, OBJECT_SIZE, PROT_READ | PROT_WRITE); in mmap_bo() 69 create_pointer(int fd) in create_pointer() argument 74 handle = gem_create(fd, OBJECT_SIZE); in create_pointer() 76 ptr = mmap_bo(fd, handle); in create_pointer() 78 gem_close(fd, handle); in create_pointer() 84 test_access(int fd) in test_access() argument 90 handle = gem_create(fd, OBJECT_SIZE); in test_access() [all …]
|
D | gem_busy.c | 41 static bool gem_busy(int fd, uint32_t handle) in gem_busy() argument 48 do_ioctl(fd, DRM_IOCTL_I915_GEM_BUSY, &busy); in gem_busy() 53 static void __gem_busy(int fd, in __gem_busy() argument 63 do_ioctl(fd, DRM_IOCTL_I915_GEM_BUSY, &busy); in __gem_busy() 69 static bool exec_noop(int fd, in exec_noop() argument 90 return __gem_execbuf(fd, &execbuf) == 0; in exec_noop() 93 static bool still_busy(int fd, uint32_t handle) in still_busy() argument 96 __gem_busy(fd, handle, &read, &write); in still_busy() 100 static void semaphore(int fd, const struct intel_execution_engine2 *e) in semaphore() argument 111 handle[TEST] = gem_create(fd, 4096); in semaphore() [all …]
|
/external/igt-gpu-tools/tests/ |
D | syncobj_basic.c | 34 test_bad_destroy(int fd) in test_bad_destroy() argument 42 ret = ioctl(fd, DRM_IOCTL_SYNCOBJ_DESTROY, &destroy); in test_bad_destroy() 47 /* handle to fd a bad handle */ 49 test_bad_handle_to_fd(int fd) in test_bad_handle_to_fd() argument 56 igt_assert_eq(__syncobj_handle_to_fd(fd, &handle), -EINVAL); in test_bad_handle_to_fd() 59 /* fd to handle a bad fd */ 61 test_bad_fd_to_handle(int fd) in test_bad_fd_to_handle() argument 65 handle.fd = -1; in test_bad_fd_to_handle() 68 igt_assert_eq(__syncobj_fd_to_handle(fd, &handle), -EINVAL); in test_bad_fd_to_handle() 71 /* fd to handle an fd but not a sync file one */ [all …]
|
D | syncobj_wait.c | 65 syncobj_attach_sw_sync(int fd, uint32_t handle) in syncobj_attach_sw_sync() argument 72 syncobj_import_sync_file(fd, handle, fence); in syncobj_attach_sw_sync() 79 syncobj_trigger(int fd, uint32_t handle) in syncobj_trigger() argument 81 int timeline = syncobj_attach_sw_sync(fd, handle); in syncobj_trigger() 111 int fd; member 125 syncobj_trigger(pair->fd, pair->handle); in syncobj_trigger_free_pair_func() 130 syncobj_trigger_delayed(int fd, uint32_t syncobj, uint64_t nsec) in syncobj_trigger_delayed() argument 134 pair->fd = fd; in syncobj_trigger_delayed() 141 test_wait_bad_flags(int fd) in test_wait_bad_flags() argument 145 igt_assert_eq(__syncobj_wait(fd, &wait), -EINVAL); in test_wait_bad_flags() [all …]
|
D | kms_addfb_basic.c | 47 static int legacy_addfb(int fd, struct drm_mode_fb_cmd *arg) in legacy_addfb() argument 52 if (igt_ioctl(fd, DRM_IOCTL_MODE_ADDFB, arg)) in legacy_addfb() 59 static int rmfb(int fd, uint32_t id) in rmfb() argument 64 if (igt_ioctl(fd, DRM_IOCTL_MODE_RMFB, &id)) in rmfb() 71 static void invalid_tests(int fd) in invalid_tests() argument 81 gem_bo = igt_create_bo_with_dimensions(fd, 1024, 1024, in invalid_tests() 84 gem_bo_small = igt_create_bo_with_dimensions(fd, 1024, 1023, in invalid_tests() 90 igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == 0); in invalid_tests() 91 igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &f.fb_id) == 0); in invalid_tests() 98 igt_require_fb_modifiers(fd); in invalid_tests() [all …]
|
/external/ltp/testcases/kernel/security/tomoyo/ |
D | tomoyo_new_file_test.c | 96 int fd; in stage_file_test() local 190 fd = open("/dev/null", O_RDONLY); in stage_file_test() 191 show_result(fd, 1); in stage_file_test() 192 if (fd != EOF) in stage_file_test() 193 close(fd); in stage_file_test() 195 fd = open("/dev/null", O_RDONLY); in stage_file_test() 196 show_result(fd, 0); in stage_file_test() 197 if (fd != EOF) in stage_file_test() 198 close(fd); in stage_file_test() 202 fd = open("/dev/null", O_RDONLY); in stage_file_test() [all …]
|
/external/llvm-project/llvm/test/CodeGen/RISCV/ |
D | interrupt-attr.ll | 7 ; RUN: 2>&1 | FileCheck %s -check-prefix CHECK -check-prefix CHECK-RV32-FD 14 ; RUN: 2>&1 | FileCheck %s -check-prefix CHECK -check-prefix CHECK-RV64-FD 196 ; CHECK-RV32-FD-LABEL: foo_with_call: 197 ; CHECK-RV32-FD: # %bb.0: 198 ; CHECK-RV32-FD-NEXT: addi sp, sp, -320 199 ; CHECK-RV32-FD-NEXT: sw ra, 316(sp) 200 ; CHECK-RV32-FD-NEXT: sw t0, 312(sp) 201 ; CHECK-RV32-FD-NEXT: sw t1, 308(sp) 202 ; CHECK-RV32-FD-NEXT: sw t2, 304(sp) 203 ; CHECK-RV32-FD-NEXT: sw a0, 300(sp) [all …]
|
/external/igt-gpu-tools/lib/ |
D | ioctl_wrappers.h | 44 * @fd: file descriptor 51 extern int (*igt_ioctl)(int fd, unsigned long request, void *arg); 54 drm_intel_bo * gem_handle_to_libdrm_bo(drm_intel_bufmgr *bufmgr, int fd, 60 bool gem_get_tiling(int fd, uint32_t handle, uint32_t *tiling, uint32_t *swizzle); 61 void gem_set_tiling(int fd, uint32_t handle, uint32_t tiling, uint32_t stride); 62 int __gem_set_tiling(int fd, uint32_t handle, uint32_t tiling, uint32_t stride); 64 int __gem_set_caching(int fd, uint32_t handle, uint32_t caching); 65 void gem_set_caching(int fd, uint32_t handle, uint32_t caching); 66 uint32_t gem_get_caching(int fd, uint32_t handle); 67 uint32_t gem_flink(int fd, uint32_t handle); [all …]
|
D | ioctl_wrappers.c | 89 int (*igt_ioctl)(int fd, unsigned long request, void *arg) = drmIoctl; 95 * @fd: open i915 drm file descriptor 105 gem_handle_to_libdrm_bo(drm_intel_bufmgr *bufmgr, int fd, const char *name, uint32_t handle) in gem_handle_to_libdrm_bo() argument 113 ret = ioctl(fd, DRM_IOCTL_GEM_FLINK, &flink); in gem_handle_to_libdrm_bo() 124 __gem_get_tiling(int fd, struct drm_i915_gem_get_tiling *arg) in __gem_get_tiling() argument 129 if (igt_ioctl(fd, DRM_IOCTL_I915_GEM_GET_TILING, arg)) in __gem_get_tiling() 138 * @fd: open i915 drm file descriptor 148 gem_get_tiling(int fd, uint32_t handle, uint32_t *tiling, uint32_t *swizzle) in gem_get_tiling() argument 155 igt_assert_eq(__gem_get_tiling(fd, &get_tiling), 0); in gem_get_tiling() 163 int __gem_set_tiling(int fd, uint32_t handle, uint32_t tiling, uint32_t stride) in __gem_set_tiling() argument [all …]
|
/external/pdfium/third_party/libtiff/ |
D | tif_print.c | 36 _TIFFprintAsciiBounded(FILE* fd, const char* cp, size_t max_chars); 67 _TIFFPrintField(FILE* fd, const TIFFField *fip, in _TIFFPrintField() argument 72 fprintf(fd, " %s: ", fip->field_name); in _TIFFPrintField() 76 fprintf(fd, "%u", ((uint8 *) raw_data)[j]); in _TIFFPrintField() 78 fprintf(fd, "0x%x", in _TIFFPrintField() 81 fprintf(fd, "%d", ((int8 *) raw_data)[j]); in _TIFFPrintField() 83 fprintf(fd, "%u", ((uint16 *) raw_data)[j]); in _TIFFPrintField() 85 fprintf(fd, "%d", ((int16 *) raw_data)[j]); in _TIFFPrintField() 87 fprintf(fd, "%lu", in _TIFFPrintField() 90 fprintf(fd, "%ld", (long)((int32 *) raw_data)[j]); in _TIFFPrintField() [all …]
|
/external/openscreen/tools/cddl/ |
D | codegen.cc | 85 bool WriteEnumEqualityOperatorSwitchCases(int fd, in WriteEnumEqualityOperatorSwitchCases() argument 91 dprintf(fd, " case %s::%s: return parent == %s::%s;\n", in WriteEnumEqualityOperatorSwitchCases() 97 [&fd, &child_name, &parent_name](CppType* new_parent) { in WriteEnumEqualityOperatorSwitchCases() 99 fd, *new_parent, child_name, parent_name); in WriteEnumEqualityOperatorSwitchCases() 104 bool WriteEnumEqualityOperator(int fd, in WriteEnumEqualityOperator() argument 111 dprintf(fd, "inline bool operator==(const %s& child, const %s& parent) {\n", in WriteEnumEqualityOperator() 113 dprintf(fd, " switch (child) {\n"); in WriteEnumEqualityOperator() 114 if (!WriteEnumEqualityOperatorSwitchCases(fd, parent, name, parent_name)) { in WriteEnumEqualityOperator() 117 dprintf(fd, " default: return false;\n"); in WriteEnumEqualityOperator() 118 dprintf(fd, " }\n}\n"); in WriteEnumEqualityOperator() [all …]
|
/external/rust/crates/grpcio-sys/grpc/src/core/lib/iomgr/ |
D | ev_poll_posix.cc | 55 * FD declarations 62 grpc_fd* fd; member 69 /* Only one of fd or cached_wakeup_fd will be set. The unused field will be 71 grpc_fd* fd; member 79 int fd; member 98 An fd_watcher is an ephemeral object created when an fd wants to 101 It denotes the fd's interest in whether to read poll or write poll 102 or both or neither on this fd. 138 /* Begin polling on an fd. 139 Registers that the given pollset is interested in this fd - so that if read [all …]
|
/external/e2fsprogs/tests/progs/ |
D | random_exercise.c | 51 int fd; in get_random_fd() local 54 fd = ((int) random()) % MAXFDS; in get_random_fd() 55 if (fd > 2) in get_random_fd() 56 return fd; in get_random_fd() 60 unsigned int get_inode_num(int fd) in get_inode_num() argument 64 if (fstat(fd, &st) < 0) { in get_inode_num() 75 int fd; in create_random_file() local 84 fd = open(template, O_RDONLY, 0600); in create_random_file() 85 printf("Created temp directory %s, fd = %d\n", in create_random_file() 86 template, fd); in create_random_file() [all …]
|
/external/llvm-project/clang/test/Analysis/ |
D | unix-api.c | 16 int fd; in open_1() local 17 fd = open(path, O_RDONLY); // no-warning in open_1() 18 if (fd > -1) in open_1() 19 close(fd); in open_1() 23 int fd; in open_2() local 25 …fd = open(path, O_RDONLY, mode, NULL); // expected-warning{{Call to 'open' with more than 3 argume… in open_2() 26 if (fd > -1) in open_2() 27 close(fd); in open_2() 31 int fd; in openat_2() local 33 …fd = openat(base_fd, path, O_RDONLY, mode, NULL); // expected-warning{{Call to 'openat' with more … in openat_2() [all …]
|