From cbbabd71c73d60c4f4253c4717b7c421c07fa2eb Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 21 Feb 2007 06:27:56 +0000 Subject: stub out msync() for no-mmu as well --- include/sys/mman.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/sys/mman.h b/include/sys/mman.h index 10f4afe24..76c2009bf 100644 --- a/include/sys/mman.h +++ b/include/sys/mman.h @@ -81,6 +81,8 @@ extern int munmap (void *__addr, size_t __len) __THROW; (and sets errno). */ extern int mprotect (void *__addr, size_t __len, int __prot) __THROW; +#ifdef __ARCH_USE_MMU__ + /* Synchronize the region starting at ADDR and extending LEN bytes with the file it maps. Filesystem operations on a file being mapped are unpredictable before this is done. Flags are from the MS_* set. @@ -89,6 +91,13 @@ extern int mprotect (void *__addr, size_t __len, int __prot) __THROW; __THROW. */ extern int msync (void *__addr, size_t __len, int __flags); +#else + +/* On no-mmu systems you can't have real private mappings. */ +static inline int msync (void *__addr, size_t __len, int __flags) { return 0; } + +#endif + #ifdef __USE_BSD /* Advise the system about particular usage patterns the program follows for the region starting at ADDR and extending LEN bytes. */ @@ -120,8 +129,7 @@ extern int munlockall (void) __THROW; #else /* On no-mmu systems, memory cannot be swapped out, so - * these functions will always succeed. - */ + * these functions will always succeed. */ 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; } -- cgit v1.2.3