LibC: Stub mlock in sys/mman

mlock is supposed to prevent memory from being paged out to swap, which
we don't have currently.

Required by OpenSSL.
This commit is contained in:
Luke 2021-07-29 22:22:50 +01:00 committed by Gunnar Beutner
parent add3a02ddd
commit f5d4de8b66
Notes: sideshowbarker 2024-07-18 07:44:30 +09:00
2 changed files with 8 additions and 0 deletions

View file

@ -4,6 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/Format.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
@ -82,4 +83,10 @@ void* allocate_tls(const char* initial_data, size_t size)
}
return (void*)rc;
}
int mlock(const void*, size_t)
{
dbgln("FIXME: Implement mlock()");
return 0;
}
}

View file

@ -41,5 +41,6 @@ int mprotect(void*, size_t, int prot);
int set_mmap_name(void*, size_t, const char*);
int madvise(void*, size_t, int advice);
void* allocate_tls(const char* initial_data, size_t);
int mlock(const void*, size_t);
__END_DECLS