mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:52:45 +00:00 
			
		
		
		
	IDEDiskDevice: Support reading multiple sectors at a time with DMA.
This is another sizable improvement to GCC compile times.
This commit is contained in:
		
							parent
							
								
									ed79116e94
								
							
						
					
					
						commit
						c7d8aa6969
					
				
					 4 changed files with 27 additions and 14 deletions
				
			
		|  | @ -15,12 +15,8 @@ bool DiskDevice::read(DiskOffset offset, unsigned length, byte* out) const | |||
|     dword first_block = offset / block_size(); | ||||
|     dword end_block = (offset + length) / block_size(); | ||||
|     byte* outptr = out; | ||||
|     for (unsigned bi = first_block; bi < end_block; ++bi) { | ||||
|         if (!read_block(bi, outptr)) | ||||
|             return false; | ||||
|         outptr += block_size(); | ||||
|     } | ||||
|     return true; | ||||
| 
 | ||||
|     return const_cast<DiskDevice*>(this)->read_blocks(first_block, end_block - first_block, outptr); | ||||
| } | ||||
| 
 | ||||
| bool DiskDevice::write(DiskOffset offset, unsigned length, const byte* in) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling