diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-10-26 22:32:35 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-10-26 22:33:15 +0200 |
commit | c928b062180b10a9908325727e18483e029edada (patch) | |
tree | 38d9c7cafc21ed9d438cc137bbb613f38cb1415d /VirtualFileSystem/SyntheticFileSystem.cpp | |
parent | 81627cf7d539b3aa15773967f6c3d7c6e7ca86be (diff) | |
download | serenity-c928b062180b10a9908325727e18483e029edada.zip |
Add a very hackish /proc/PID/stack.
It walks the stack and identifies anything that looks like a kernel symbol.
This could be a lot more sophisticated.
Diffstat (limited to 'VirtualFileSystem/SyntheticFileSystem.cpp')
-rw-r--r-- | VirtualFileSystem/SyntheticFileSystem.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/VirtualFileSystem/SyntheticFileSystem.cpp b/VirtualFileSystem/SyntheticFileSystem.cpp index 0943949475..f36deeed9c 100644 --- a/VirtualFileSystem/SyntheticFileSystem.cpp +++ b/VirtualFileSystem/SyntheticFileSystem.cpp @@ -79,6 +79,7 @@ auto SyntheticFileSystem::createGeneratedFile(String&& name, Function<ByteBuffer InodeIdentifier SyntheticFileSystem::addFile(OwnPtr<File>&& file, InodeIndex parent) { + ASSERT_INTERRUPTS_DISABLED(); ASSERT(file); auto it = m_inodes.find(parent); ASSERT(it != m_inodes.end()); @@ -92,6 +93,7 @@ InodeIdentifier SyntheticFileSystem::addFile(OwnPtr<File>&& file, InodeIndex par bool SyntheticFileSystem::removeFile(InodeIndex inode) { + ASSERT_INTERRUPTS_DISABLED(); auto it = m_inodes.find(inode); if (it == m_inodes.end()) return false; @@ -127,6 +129,7 @@ InodeIdentifier SyntheticFileSystem::rootInode() const bool SyntheticFileSystem::enumerateDirectoryInode(InodeIdentifier inode, Function<bool(const DirectoryEntry&)> callback) const { + InterruptDisabler disabler; ASSERT(inode.fileSystemID() == id()); #ifdef SYNTHFS_DEBUG kprintf("[synthfs] enumerateDirectoryInode %u\n", inode.index()); @@ -150,6 +153,7 @@ bool SyntheticFileSystem::enumerateDirectoryInode(InodeIdentifier inode, Functio InodeMetadata SyntheticFileSystem::inodeMetadata(InodeIdentifier inode) const { + InterruptDisabler disabler; ASSERT(inode.fileSystemID() == id()); #ifdef SYNTHFS_DEBUG kprintf("[synthfs] inodeMetadata(%u)\n", inode.index()); @@ -186,6 +190,8 @@ bool SyntheticFileSystem::writeInode(InodeIdentifier, const ByteBuffer&) Unix::ssize_t SyntheticFileSystem::readInodeBytes(InodeIdentifier inode, Unix::off_t offset, Unix::size_t count, byte* buffer) const { + InterruptDisabler disabler; + ASSERT(inode.fileSystemID() == id()); #ifdef SYNTHFS_DEBUG kprintf("[synthfs] readInode %u\n", inode.index()); |