/haiku/src/system/kernel/arch/generic/ |
H A D | generic_vm_physical_page_ops.cpp | 51 size_t toCopy = min_c(length, B_PAGE_SIZE - pageOffset); in generic_vm_memcpy_from_physical() local 62 toCopy); in generic_vm_memcpy_from_physical() 64 memcpy(to, (void*)(virtualAddress + pageOffset), toCopy); in generic_vm_memcpy_from_physical() 71 to += toCopy; in generic_vm_memcpy_from_physical() 72 from += toCopy; in generic_vm_memcpy_from_physical() 73 length -= toCopy; in generic_vm_memcpy_from_physical() 91 size_t toCopy = min_c(length, B_PAGE_SIZE - pageOffset); in generic_vm_memcpy_to_physical() local 102 toCopy); in generic_vm_memcpy_to_physical() 104 memcpy((void*)(virtualAddress + pageOffset), from, toCopy); in generic_vm_memcpy_to_physical() 111 to += toCopy; in generic_vm_memcpy_to_physical() [all …]
|
/haiku/src/kits/debugger/debugger_interface/ |
H A D | DebuggerInterface.cpp | 40 size_t toCopy = std::min(size, size_t(fSymbolTableSize - address)); in Read() local 41 memcpy(buffer, fSymbolTable + address, toCopy); in Read() 42 address -= toCopy; in Read() 43 size -= toCopy; in Read() 44 copied += toCopy; in Read() 48 size_t toCopy = std::min(size, size_t(fStringTableEnd - address)); in Read() local 49 memcpy(buffer, fStringTable + address - fSymbolTableSize, toCopy); in Read() 50 address -= toCopy; in Read() 51 size -= toCopy; in Read() 52 copied += toCopy; in Read()
|
/haiku/src/add-ons/kernel/file_systems/packagefs/nodes/ |
H A D | AutoPackageAttributes.cpp | 52 size_t toCopy = *bufferSize; in ReadAttribute() local 53 if (offset + (off_t)toCopy > size) in ReadAttribute() 54 toCopy = size - offset; in ReadAttribute() 56 if (toCopy > 0 && user_memcpy(buffer, (const uint8*)value + offset, in ReadAttribute() 57 toCopy) < B_OK) { in ReadAttribute() 61 *bufferSize = toCopy; in ReadAttribute()
|
/haiku/src/apps/cortex/addons/common/ |
H A D | RawBuffer.cpp | 239 uint32 toCopy = frames * m_frameSize; in rawCopyTo() local 241 if(toCopy > targetSize) in rawCopyTo() 242 toCopy = targetSize; in rawCopyTo() 244 if(toCopy > (targetSize-targetOffset)) in rawCopyTo() 245 toCopy = (targetSize-targetOffset); in rawCopyTo() 247 uint32 remaining = toCopy; in rawCopyTo() 291 return toCopy; in rawCopyTo()
|
H A D | AudioBuffer.cpp | 211 uint32 toCopy = frames * m_format.channel_count; in copyTo() local 213 if(toCopy > targetSize) in copyTo() 214 toCopy = targetSize; in copyTo() 216 if(toCopy > (targetSize-targetOffset)) in copyTo() 217 toCopy = (targetSize-targetOffset); in copyTo() 219 uint32 remaining = toCopy; in copyTo() 244 return toCopy; in copyTo()
|
/haiku/src/system/kernel/debug/ |
H A D | BreakpointManager.cpp | 309 size_t toCopy = std::min(address + size, in ReadMemory() local 314 toCopy); in ReadMemory() 358 size_t toCopy = std::min(address + size, in WriteMemory() local 362 buffer, toCopy); in WriteMemory() 364 address += toCopy; in WriteMemory() 365 size -= toCopy; in WriteMemory() 366 bytesWritten += toCopy; in WriteMemory() 367 buffer += toCopy; in WriteMemory() 381 size_t toCopy = breakpoint->address - address; in WriteMemory() local 382 if (toCopy > 0) { in WriteMemory() [all …]
|
H A D | debug.cpp | 1971 size_t toCopy = std::min(size, sizeof(buffer)); in debug_memcpy() local 1974 if (((addr_t)from + toCopy) % B_PAGE_SIZE < toCopy) in debug_memcpy() 1975 toCopy -= ((addr_t)from + toCopy) % B_PAGE_SIZE; in debug_memcpy() 1976 if (((addr_t)to + toCopy) % B_PAGE_SIZE < toCopy) in debug_memcpy() 1977 toCopy -= ((addr_t)to + toCopy) % B_PAGE_SIZE; in debug_memcpy() 1979 if (vm_debug_copy_page_memory(teamID, (void*)from, buffer, toCopy, in debug_memcpy() 1981 || vm_debug_copy_page_memory(teamID, to, buffer, toCopy, true) in debug_memcpy() 1986 from = (const uint8*)from + toCopy; in debug_memcpy() 1987 to = (uint8*)to + toCopy; in debug_memcpy() 1988 size -= toCopy; in debug_memcpy() [all …]
|
H A D | safemode_settings.cpp | 125 size_t toCopy = std::min(length, *_bufferSize - 1); in get_option_from_kernel_args() local 126 memcpy(buffer, valueStart, toCopy); in get_option_from_kernel_args() 127 buffer[toCopy] = '\0'; in get_option_from_kernel_args()
|
/haiku/src/kits/support/ |
H A D | BufferedDataIO.cpp | 193 size_t toCopy = min_c(size, fBufferSize - (fPosition + fSize)); in Write() local 195 toCopy); in Write() 196 memcpy(fBuffer + (fPosition + fSize), buffer, toCopy); in Write() 197 fSize += toCopy; in Write() 198 bytesWritten += toCopy; in Write() 199 size -= toCopy; in Write()
|
/haiku/src/system/boot/loader/net/ |
H A D | RemoteDisk.cpp | 255 size_t toCopy = size_t(packetOffset + packetSize - (uint64)pos); in _ReadFromPacket() local 256 if (toCopy > bufferSize) in _ReadFromPacket() 257 toCopy = bufferSize; in _ReadFromPacket() 258 memcpy(buffer, header->data + (pos - packetOffset), toCopy); in _ReadFromPacket() 260 pos += toCopy; in _ReadFromPacket() 261 buffer += toCopy; in _ReadFromPacket() 262 bufferSize -= toCopy; in _ReadFromPacket() 263 return toCopy; in _ReadFromPacket()
|
/haiku/src/system/libroot/os/ |
H A D | PathBuffer.h | 42 size_t toCopy = std::min(length, fSize - fLength - 1); in Append() local 43 memcpy(fBuffer + fLength, toAppend, toCopy); in Append() 44 fBuffer[fLength + toCopy] = '\0'; in Append()
|
/haiku/src/add-ons/kernel/drivers/disk/virtual/remote_disk/ |
H A D | RemoteDisk.cpp | 361 size_t toCopy = size_t(packetOffset + packetSize - (uint64)pos); in _ReadFromPacket() local 362 if (toCopy > bufferSize) in _ReadFromPacket() 363 toCopy = bufferSize; in _ReadFromPacket() 367 header->data + (pos - packetOffset), toCopy); in _ReadFromPacket() 371 memcpy(buffer, header->data + (pos - packetOffset), toCopy); in _ReadFromPacket() 373 pos += toCopy; in _ReadFromPacket() 374 buffer += toCopy; in _ReadFromPacket() 375 bufferSize -= toCopy; in _ReadFromPacket() 376 return toCopy; in _ReadFromPacket()
|
/haiku/src/add-ons/kernel/file_systems/packagefs/package/ |
H A D | CachedDataReader.cpp | 49 size_t toCopy = std::min(bytesRemaining, in Write() local 53 buffer, toCopy, false); in Write() 57 fInPageOffset += toCopy; in Write() 64 buffer = (const char*)buffer + toCopy; in Write() 65 bytesRemaining -= toCopy; in Write() 379 size_t toCopy = std::min(B_PAGE_SIZE - inPageOffset, requestLength); in _WritePages() local 380 error = output->WriteExactly((uint8*)(address + inPageOffset), toCopy); in _WritePages() 389 requestLength -= toCopy; in _WritePages()
|
/haiku/src/system/kernel/arch/m68k/paging/ |
H A D | m68k_physical_page_mapper_large_memory.cpp | 618 size_t toCopy = min_c(length, B_PAGE_SIZE - pageOffset); in MemcpyFromPhysical() local 624 toCopy); in MemcpyFromPhysical() 628 memcpy(to, (void*)(slot->address + pageOffset), toCopy); in MemcpyFromPhysical() 630 to += toCopy; in MemcpyFromPhysical() 631 from += toCopy; in MemcpyFromPhysical() 632 length -= toCopy; in MemcpyFromPhysical() 658 size_t toCopy = min_c(length, B_PAGE_SIZE - pageOffset); in MemcpyToPhysical() local 664 toCopy); in MemcpyToPhysical() 668 memcpy((void*)(slot->address + pageOffset), from, toCopy); in MemcpyToPhysical() 670 to += toCopy; in MemcpyToPhysical() [all …]
|
/haiku/src/system/kernel/arch/x86/paging/ |
H A D | x86_physical_page_mapper_large_memory.cpp | 615 size_t toCopy = min_c(length, B_PAGE_SIZE - pageOffset); in MemcpyFromPhysical() local 621 toCopy); in MemcpyFromPhysical() 625 memcpy(to, (void*)(slot->address + pageOffset), toCopy); in MemcpyFromPhysical() 627 to += toCopy; in MemcpyFromPhysical() 628 from += toCopy; in MemcpyFromPhysical() 629 length -= toCopy; in MemcpyFromPhysical() 655 size_t toCopy = min_c(length, B_PAGE_SIZE - pageOffset); in MemcpyToPhysical() local 661 toCopy); in MemcpyToPhysical() 665 memcpy((void*)(slot->address + pageOffset), from, toCopy); in MemcpyToPhysical() 667 to += toCopy; in MemcpyToPhysical() [all …]
|
/haiku/src/system/kernel/arch/arm/paging/ |
H A D | arm_physical_page_mapper_large_memory.cpp | 620 size_t toCopy = min_c(length, B_PAGE_SIZE - pageOffset); in MemcpyFromPhysical() local 626 toCopy); in MemcpyFromPhysical() 630 memcpy(to, (void*)(slot->address + pageOffset), toCopy); in MemcpyFromPhysical() 632 to += toCopy; in MemcpyFromPhysical() 633 from += toCopy; in MemcpyFromPhysical() 634 length -= toCopy; in MemcpyFromPhysical() 660 size_t toCopy = min_c(length, B_PAGE_SIZE - pageOffset); in MemcpyToPhysical() local 666 toCopy); in MemcpyToPhysical() 670 memcpy((void*)(slot->address + pageOffset), from, toCopy); in MemcpyToPhysical() 672 to += toCopy; in MemcpyToPhysical() [all …]
|
/haiku/src/system/libroot/posix/crypt/ |
H A D | SHA256.cpp | 75 size_t toCopy = kChunkSize - fBytesInBuffer; in Update() local 76 memcpy((uint8*)fBuffer + fBytesInBuffer, buffer, toCopy); in Update() 77 buffer += toCopy; in Update() 78 size -= toCopy; in Update()
|
/haiku/src/system/runtime_loader/ |
H A D | runtime_loader.cpp | 142 size_t toCopy; in replace_executable_path_placeholder() local 144 toCopy = lastSlash - replacementSubPath; in replace_executable_path_placeholder() 149 toCopy = 1; in replace_executable_path_placeholder() 153 if (toCopy >= bufferSize) { in replace_executable_path_placeholder() 158 memcpy(buffer, replacementSubPath, toCopy); in replace_executable_path_placeholder() 159 buffer[toCopy] = '\0'; in replace_executable_path_placeholder() 161 buffer += toCopy; in replace_executable_path_placeholder() 162 bufferSize -= toCopy; in replace_executable_path_placeholder()
|
/haiku/src/add-ons/kernel/busses/mmc/ |
H A D | sdhci.cpp | 409 size_t toCopy = std::min((generic_size_t)length, in DoIO() local 413 if (toCopy == 0) { in DoIO() 420 ASSERT(toCopy % kBlockSize == 0); in DoIO() 425 fRegisters->block_count = toCopy / kBlockSize; in DoIO() 450 length -= toCopy; in DoIO() 451 vecOffset += toCopy; in DoIO() 452 offset += toCopy; in DoIO()
|
/haiku/src/kits/package/hpkg/ |
H A D | PackageFileHeapWriter.cpp | 268 size_t toCopy = std::min(remainingSize, in AddData() local 271 (uint8*)fPendingDataBuffer + fPendingDataSize, toCopy); in AddData() 278 fPendingDataSize += toCopy; in AddData() 279 fUncompressedHeapSize += toCopy; in AddData() 280 remainingSize -= toCopy; in AddData() 281 readOffset += toCopy; in AddData()
|
/haiku/src/bin/package/ |
H A D | command_extract.cpp | 725 size_t toCopy = std::min((off_t)fDataBufferSize, bytesRemaining); in _ExtractFileData() local 726 error = reader->ReadData(offset, fDataBuffer, toCopy); in _ExtractFileData() 734 ssize_t bytesWritten = write_pos(fd, offset, fDataBuffer, toCopy); in _ExtractFileData() 740 if ((size_t)bytesWritten != toCopy) { in _ExtractFileData() 742 "%zu)\n", bytesWritten, toCopy); in _ExtractFileData() 746 offset += toCopy; in _ExtractFileData() 747 bytesRemaining -= toCopy; in _ExtractFileData()
|
/haiku/src/kits/package/hpkg/v1/ |
H A D | PackageDataReaderV1.cpp | 245 size_t toCopy = std::min(size, (size_t)fChunkSize - inChunkOffset); in ReadDataToOutput() local 247 (uint8*)fUncompressBuffer->Buffer() + inChunkOffset, toCopy); in ReadDataToOutput() 251 size -= toCopy; in ReadDataToOutput()
|
/haiku/src/tests/system/kernel/file_corruption/driver/ |
H A D | checksum_device.cpp | 553 size_t toCopy = std::min((generic_size_t)length, in _CopyData() local 556 if (toCopy == 0) { in _CopyData() 565 ? vm_memcpy_from_physical(buffer, vecAddress, toCopy, false) in _CopyData() 566 : vm_memcpy_to_physical(vecAddress, buffer, toCopy, false); in _CopyData() 570 buffer += toCopy; in _CopyData() 571 length -= toCopy; in _CopyData() 572 vecOffset += toCopy; in _CopyData()
|
/haiku/src/add-ons/kernel/drivers/disk/virtual/ram_disk/ |
H A D | ram_disk.cpp | 699 size_t toCopy = std::min((generic_size_t)length, in _CopyData() local 702 if (toCopy == 0) { in _CopyData() 711 ? vm_memcpy_from_physical(pageData, vecAddress, toCopy, false) in _CopyData() 713 ? vm_memcpy_to_physical(vecAddress, pageData, toCopy, false) in _CopyData() 714 : vm_memset_physical(vecAddress, 0, toCopy)); in _CopyData() 718 pageData += toCopy; in _CopyData() 719 length -= toCopy; in _CopyData() 720 vecOffset += toCopy; in _CopyData()
|
/haiku/src/tests/system/kernel/file_corruption/fs/ |
H A D | File.cpp | 809 size_t toCopy = std::min((size_t)B_PAGE_SIZE - inBlockOffset, size); in _WriteData() local 812 buffer, toCopy); in _WriteData() 816 memset(tempData->blockData + inBlockOffset, 0, toCopy); in _WriteData() 834 size_t toCopy = (size + inBlockOffset) % B_PAGE_SIZE; in _WriteData() local 839 toCopy); in _WriteData() 843 memset(tempData->blockData, 0, toCopy); in _WriteData()
|