Home
last modified time | relevance | path

Searched refs:memBuf (Results 1 – 2 of 2) sorted by relevance

/drivers/peripheral/usb/test/unittest/mock/src/
Dmock_linux_adapter.cpp387 void *memBuf = nullptr; in FuncAdapterAllocRequest() local
396 memBuf = RawUsbMemCalloc(allocSize); in FuncAdapterAllocRequest()
397 if (memBuf == nullptr) { in FuncAdapterAllocRequest()
401 request = static_cast<UsbHostRequest *>(memBuf); in FuncAdapterAllocRequest()
404 request->buffer = static_cast<unsigned char *>(memBuf) + allocSize - len; in FuncAdapterAllocRequest()
409 RawUsbMemFree(memBuf); in FuncAdapterAllocRequest()
/drivers/peripheral/usb/ddk/host/src/
Dlinux_adapter.c1207 void *memBuf = NULL; in AdapterAllocRequest() local
1217 memBuf = RawUsbMemCalloc(allocSize); in AdapterAllocRequest()
1218 if (memBuf == NULL) { in AdapterAllocRequest()
1223 memBuf = mmap(NULL, allocSize, PROT_READ | PROT_WRITE, MAP_SHARED, handle->fd, 0); in AdapterAllocRequest()
1224 if (memBuf == MAP_FAILED) { in AdapterAllocRequest()
1229 request = (struct UsbHostRequest *)memBuf; in AdapterAllocRequest()
1231 request->buffer = (unsigned char *)memBuf + allocSize - len; in AdapterAllocRequest()
1245 void *memBuf = NULL; in AdapterAllocRequestByMmap() local
1261 memBuf = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, handle->mmapFd, 0); in AdapterAllocRequestByMmap()
1262 if (memBuf == MAP_FAILED) { in AdapterAllocRequestByMmap()
[all …]