mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:22:43 +00:00 
			
		
		
		
	 3f3f45580a
			
		
	
	
		3f3f45580a
		
	
	
	
	
		
			
			Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
		
			
				
	
	
		
			27 lines
		
	
	
	
		
			680 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
	
		
			680 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <Kernel/FileSystem/VirtualFileSystem.h>
 | |
| #include <Kernel/Process.h>
 | |
| #include <Kernel/Sections.h>
 | |
| #include <Kernel/Tasks/SyncTask.h>
 | |
| #include <Kernel/Time/TimeManagement.h>
 | |
| 
 | |
| namespace Kernel {
 | |
| 
 | |
| UNMAP_AFTER_INIT void SyncTask::spawn()
 | |
| {
 | |
|     RefPtr<Thread> syncd_thread;
 | |
|     (void)Process::create_kernel_process(syncd_thread, KString::must_create("VFS Sync Task"sv), [] {
 | |
|         dbgln("VFS SyncTask is running");
 | |
|         for (;;) {
 | |
|             VirtualFileSystem::sync();
 | |
|             (void)Thread::current()->sleep(Time::from_seconds(1));
 | |
|         }
 | |
|     });
 | |
| }
 | |
| 
 | |
| }
 |