about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/sys/mman.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/sys/mman.h')
-rw-r--r--sysdeps/unix/sysv/linux/sys/mman.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/sys/mman.h b/sysdeps/unix/sysv/linux/sys/mman.h
index b05738d8e4..9f0ef72100 100644
--- a/sysdeps/unix/sysv/linux/sys/mman.h
+++ b/sysdeps/unix/sysv/linux/sys/mman.h
@@ -17,10 +17,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-/* These are the bits used by 4.4 BSD and its derivatives.  On systems
-   (such as GNU) where these facilities are not system services but can be
-   emulated in the C library, these are the definitions we emulate.  */
-
 #ifndef	_SYS_MMAN_H
 
 #define	_SYS_MMAN_H	1
@@ -70,6 +66,10 @@ Cambridge, MA 02139, USA.  */
 #define	MADV_WILLNEED	3	/* Will need these pages.  */
 #define	MADV_DONTNEED	4	/* Don't need these pages.  */
 
+/* Flags to `mlockall'.  */
+#define MCL_CURRENT     1	/* Lock all current mappings.  */
+#define MCL_FUTURE      2	/* Lock all future mappings.  */
+
 #include <sys/cdefs.h>
 
 __BEGIN_DECLS
@@ -106,6 +106,22 @@ int msync __P ((__caddr_t __addr, size_t __len));
    for the region starting at ADDR and extending LEN bytes.  */
 int madvise __P ((__caddr_t __addr, size_t __len, int __advice));
 
+/* Cause all currently mapped pages of the process to be memory resident
+   until unlocked by a call to the `munlockall', until the process exits,
+   or until the process calls `execve'.  */
+int mlockall __P ((int __flags));
+
+/* All currently mapped pages of the process' address space become
+   unlocked.  */
+int munlockall __P ((void));
+
+/* Guarantee all whole pages mapped by the range [ADDR,ADDR+LEN) to
+   be memory resident.  */
+int mlock __P ((__caddr_t __addr, size_t __len));
+
+/* Unlock whole pages previously mapped by the range [ADDR,ADDR+LEN).  */
+int munlock __P ((__caddr_t __addr, size_t __len));
+
 __END_DECLS