From 2a6792b44aaf2dae9100bd6f433db9df65a328df Mon Sep 17 00:00:00 2001 From: Bananymous Date: Mon, 25 May 2026 01:25:10 +0300 Subject: [PATCH] LibC: Make mlock, munlock and madvice no-ops These don't have to do anything as I don't swap processes to disk --- userspace/libraries/LibC/sys/mman.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/userspace/libraries/LibC/sys/mman.cpp b/userspace/libraries/LibC/sys/mman.cpp index 09f11bf5..e750c299 100644 --- a/userspace/libraries/LibC/sys/mman.cpp +++ b/userspace/libraries/LibC/sys/mman.cpp @@ -40,7 +40,6 @@ int posix_madvise(void* addr, size_t len, int advice) (void)addr; (void)len; (void)advice; - fprintf(stddbg, "TODO: posix_madvise"); return 0; } @@ -48,14 +47,18 @@ int posix_madvise(void* addr, size_t len, int advice) #include #include -int mlock(const void*, size_t) +int mlock(const void* addr, size_t len) { - ASSERT_NOT_REACHED(); + (void)addr; + (void)len; + return 0; } -int munlock(const void*, size_t) +int munlock(const void* addr, size_t len) { - ASSERT_NOT_REACHED(); + (void)addr; + (void)len; + return 0; } int shm_open(const char* name, int oflag, mode_t mode)