mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 00:32:45 +00:00 
			
		
		
		
	Kernel: SharedMemory should implement mmap().
This commit is contained in:
		
							parent
							
								
									237628a7a6
								
							
						
					
					
						commit
						a4e48dce77
					
				
					 3 changed files with 8 additions and 6 deletions
				
			
		|  | @ -88,3 +88,10 @@ int SharedMemory::write(FileDescriptor&, const byte* data, int data_size) | |||
|     // FIXME: Implement.
 | ||||
|     ASSERT_NOT_REACHED(); | ||||
| } | ||||
| 
 | ||||
| KResultOr<Region*> SharedMemory::mmap(Process& process, LinearAddress laddr, size_t offset, size_t size) | ||||
| { | ||||
|     if (!vmo()) | ||||
|         return KResult(-ENODEV); | ||||
|     return process.allocate_region_with_vmo(laddr, size, *vmo(), offset, name(), true, true); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling