LibC: Implement getrlimit

This commit is contained in:
2024-12-02 03:54:11 +02:00
parent d2b503910f
commit 6346e288ad
3 changed files with 49 additions and 5 deletions

View File

@@ -30,6 +30,9 @@ namespace Kernel
Terminated,
};
static constexpr size_t kernel_stack_size { PAGE_SIZE * 8 };
static constexpr size_t userspace_stack_size { PAGE_SIZE * 128 };
public:
static BAN::ErrorOr<Thread*> create_kernel(entry_t, void*, Process*);
static BAN::ErrorOr<Thread*> create_userspace(Process*, PageTable&);
@@ -103,8 +106,6 @@ namespace Kernel
// {kernel,userspace}_stack has to be destroyed before page table
BAN::UniqPtr<PageTable> m_keep_alive_page_table;
static constexpr size_t m_kernel_stack_size { PAGE_SIZE * 8 };
static constexpr size_t m_userspace_stack_size { PAGE_SIZE * 128 };
BAN::UniqPtr<VirtualRange> m_kernel_stack;
BAN::UniqPtr<VirtualRange> m_userspace_stack;
const pid_t m_tid { 0 };