mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:12:45 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
	
		
			369 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			369 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, the SerenityOS developers.
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <Kernel/Process.h>
 | |
| 
 | |
| namespace Kernel {
 | |
| 
 | |
| KResultOr<FlatPtr> Process::sys$fsync(int fd)
 | |
| {
 | |
|     VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this);
 | |
|     REQUIRE_PROMISE(stdio);
 | |
|     auto description = TRY(fds().open_file_description(fd));
 | |
|     return description->sync();
 | |
| }
 | |
| 
 | |
| }
 | 
