svn commit: trunk/uClibc/include/sys
vapier at uclibc.org
vapier at uclibc.org
Fri Sep 8 23:07:54 UTC 2006
Author: vapier
Date: 2006-09-08 16:07:54 -0700 (Fri, 08 Sep 2006)
New Revision: 16078
Log:
add some inline funcs for the mlock funcs on no-mmu
Modified:
trunk/uClibc/include/sys/mman.h
Changeset:
Modified: trunk/uClibc/include/sys/mman.h
===================================================================
--- trunk/uClibc/include/sys/mman.h 2006-09-08 17:56:52 UTC (rev 16077)
+++ trunk/uClibc/include/sys/mman.h 2006-09-08 23:07:54 UTC (rev 16078)
@@ -100,6 +100,7 @@
#endif
#ifdef __ARCH_USE_MMU__
+
/* Guarantee all whole pages mapped by the range [ADDR,ADDR+LEN) to
be memory resident. */
extern int mlock (__const void *__addr, size_t __len) __THROW;
@@ -115,6 +116,17 @@
/* All currently mapped pages of the process' address space become
unlocked. */
extern int munlockall (void) __THROW;
+
+#else
+
+/* On no-mmu systems, memory cannot be swapped out, so
+ * 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; }
+static inline int munlockall (void) { return 0; }
+
#endif
#ifdef __USE_MISC
More information about the uClibc-cvs
mailing list