svn commit: trunk/uClibc/include/sys

vapier at uclibc.org vapier at uclibc.org
Wed Feb 21 06:27:57 UTC 2007


Author: vapier
Date: 2007-02-20 22:27:56 -0800 (Tue, 20 Feb 2007)
New Revision: 17939

Log:
stub out msync() for no-mmu as well

Modified:
   trunk/uClibc/include/sys/mman.h


Changeset:
Modified: trunk/uClibc/include/sys/mman.h
===================================================================
--- trunk/uClibc/include/sys/mman.h	2007-02-21 05:14:42 UTC (rev 17938)
+++ trunk/uClibc/include/sys/mman.h	2007-02-21 06:27:56 UTC (rev 17939)
@@ -81,6 +81,8 @@
    (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 @@
    __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 @@
 #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; }




More information about the uClibc-cvs mailing list