diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-09-09 16:37:19 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-09-09 16:37:19 -0400 |
commit | a660180c6a93681c6efb54fb5826c08d4df60208 (patch) | |
tree | b44ffaf951f7bb76b913130097e53882cdc35d7b | |
parent | 2416c63b81f7f79ea781725cf1117c191775c699 (diff) | |
download | musl-a660180c6a93681c6efb54fb5826c08d4df60208.tar.gz musl-a660180c6a93681c6efb54fb5826c08d4df60208.tar.bz2 musl-a660180c6a93681c6efb54fb5826c08d4df60208.tar.xz musl-a660180c6a93681c6efb54fb5826c08d4df60208.zip |
mincore syscall wrapper
-rw-r--r-- | include/sys/mman.h | 1 | ||||
-rw-r--r-- | src/mman/mincore.c | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/sys/mman.h b/include/sys/mman.h index 0fa32e6a..136b45b3 100644 --- a/include/sys/mman.h +++ b/include/sys/mman.h @@ -33,6 +33,7 @@ void *mremap (void *, size_t, size_t, int, ...); #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) int madvise (void *, size_t, int); +int mincore (void *, size_t, unsigned char *); #endif int shm_open (const char *, int, mode_t); diff --git a/src/mman/mincore.c b/src/mman/mincore.c new file mode 100644 index 00000000..4bb19f85 --- /dev/null +++ b/src/mman/mincore.c @@ -0,0 +1,8 @@ +#define _GNU_SOURCE +#include <sys/mman.h> +#include "syscall.h" + +int mincore (void *addr, size_t len, unsigned char *vec) +{ + return syscall(SYS_mincore, addr, len, vec); +} |