Kernel: Implement SYS_SYNC and add sync executable to userspace
You can (and have to) manually sync disk after writes to it.
This commit is contained in:
@@ -15,6 +15,7 @@ namespace Kernel
|
||||
void initialize_device_updater();
|
||||
|
||||
void add_device(BAN::StringView path, BAN::RefPtr<RamInode>);
|
||||
void for_each_device(const BAN::Function<BAN::Iteration(Device*)>& callback);
|
||||
|
||||
dev_t get_next_dev();
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <BAN/HashMap.h>
|
||||
#include <BAN/Iteration.h>
|
||||
#include <kernel/FS/FileSystem.h>
|
||||
#include <kernel/SpinLock.h>
|
||||
|
||||
@@ -25,7 +26,7 @@ namespace Kernel
|
||||
blksize_t blksize() const { return m_blksize; }
|
||||
ino_t next_ino() { return m_next_ino++; }
|
||||
|
||||
void for_each_inode(void (*callback)(BAN::RefPtr<RamInode>));
|
||||
void for_each_inode(const BAN::Function<BAN::Iteration(BAN::RefPtr<RamInode>)>& callback);
|
||||
|
||||
protected:
|
||||
RamFileSystem(size_t size)
|
||||
|
||||
Reference in New Issue
Block a user