diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-02-21 06:27:56 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-02-21 06:27:56 +0000 |
commit | cbbabd71c73d60c4f4253c4717b7c421c07fa2eb (patch) | |
tree | bfd4dae1c71879fdfa6480a6740d73ce279e3402 /include | |
parent | 375c18c1df3b6d6c3cf2780f54faab8e267323da (diff) |
stub out msync() for no-mmu as well
Diffstat (limited to 'include')
-rw-r--r-- | include/sys/mman.h | 12 |
1 files changed, 10 insertions, 2 deletions
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; } |