LibC: Make mlock, munlock and madvice no-ops

These don't have to do anything as I don't swap processes to disk
This commit is contained in:
2026-05-25 01:25:10 +03:00
parent 954898b14d
commit 2a6792b44a

View File

@@ -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 <BAN/Debug.h>
#include <errno.h>
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)