diff options
author | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-03-26 11:58:14 +0000 |
---|---|---|
committer | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-03-26 11:58:14 +0000 |
commit | 17e961d9c708ab202760ce830f8efe73e91bb129 (patch) | |
tree | 2bed65a6b573c19df077607c23c7f01fdf377fcd /include | |
parent | 69fa463181d66dc23e61f0cecca8d228bb6bbed2 (diff) |
Enable remap_file_pages prototype controlled by __USE_GNU define as well as mremap, instead of __USE_MISC according to glibc. Missing prototype was spotted out by Peter Mazinger
Diffstat (limited to 'include')
-rw-r--r-- | include/sys/mman.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/include/sys/mman.h b/include/sys/mman.h index 76c2009bf..7bb1595bb 100644 --- a/include/sys/mman.h +++ b/include/sys/mman.h @@ -134,18 +134,9 @@ static inline int mlock (__const void *__addr, size_t __len) { return 0; } static inline int munlock (__const void *__addr, size_t __len) { return 0; } static inline int mlockall (int __flags) { return 0; } static inline int munlockall (void) { return 0; } - #endif #ifdef __USE_MISC -/* Remap pages mapped by the range [ADDR,ADDR+OLD_LEN) to new length - NEW_LEN. If MREMAP_MAYMOVE is set in FLAGS the returned address - may differ from ADDR. If MREMAP_FIXED is set in FLAGS the function - takes another paramter which is a fixed address at which the block - resides after a successful call. */ -extern void *mremap (void *__addr, size_t __old_len, size_t __new_len, - int __flags, ...) __THROW; - /* mincore returns the memory residency status of the pages in the current process's address space specified by [start, start + len). The status is returned in a vector of bytes. The least significant @@ -153,14 +144,22 @@ extern void *mremap (void *__addr, size_t __old_len, size_t __new_len, it is zero. */ extern int mincore (void *__start, size_t __len, unsigned char *__vec) __THROW; +#endif + +#ifdef __USE_GNU +/* Remap pages mapped by the range [ADDR,ADDR+OLD_LEN) to new length + NEW_LEN. If MREMAP_MAYMOVE is set in FLAGS the returned address + may differ from ADDR. If MREMAP_FIXED is set in FLAGS the function + takes another paramter which is a fixed address at which the block + resides after a successful call. */ +extern void *mremap (void *__addr, size_t __old_len, size_t __new_len, + int __flags, ...) __THROW; -#if 0 /* Remap arbitrary pages of a shared backing store within an existing VMA. */ extern int remap_file_pages (void *__start, size_t __size, int __prot, size_t __pgoff, int __flags) __THROW; #endif -#endif /* Open shared memory segment. */ |