Lines Matching refs:fd
54 int fd = -1, ret = 0; in libdmabufheaptest() local
82 fd = DmabufHeapAllocSystem(bufferAllocator, true /* cpu_access */, len, 0, 0); in libdmabufheaptest()
83 if (fd < 0) { in libdmabufheaptest()
84 printf("DmabufHeapAllocSystem() failed: %d cpu_access: true\n", fd); in libdmabufheaptest()
87 close(fd); in libdmabufheaptest()
89 fd = DmabufHeapAllocSystem(bufferAllocator, false /* cpu_access */, len, 0, 0); in libdmabufheaptest()
90 if (fd < 0) { in libdmabufheaptest()
91 printf("DmabufHeapAllocSystem() failed: %d cpu_access: false\n", fd); in libdmabufheaptest()
94 close(fd); in libdmabufheaptest()
96 fd = DmabufHeapAlloc(bufferAllocator, kDmabufSystemHeapName, len, 0, 0); in libdmabufheaptest()
97 if (fd < 0) { in libdmabufheaptest()
98 printf("Alloc failed: %d\n", fd); in libdmabufheaptest()
102 ptr = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in libdmabufheaptest()
108 ret = DmabufHeapCpuSyncStart(bufferAllocator, fd, kSyncReadWrite, in libdmabufheaptest()
128 ret = DmabufHeapCpuSyncEnd(bufferAllocator, fd, kSyncReadWrite, in libdmabufheaptest()
137 close(fd); in libdmabufheaptest()