Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
mlock.c File Reference
#include <linux/capability.h>
#include <linux/mman.h>
#include <linux/mm.h>
#include <linux/swap.h>
#include <linux/swapops.h>
#include <linux/pagemap.h>
#include <linux/mempolicy.h>
#include <linux/syscalls.h>
#include <linux/sched.h>
#include <linux/export.h>
#include <linux/rmap.h>
#include <linux/mmzone.h>
#include <linux/hugetlb.h>
#include "internal.h"

Go to the source code of this file.

Functions

int can_do_mlock (void)
 
 EXPORT_SYMBOL (can_do_mlock)
 
void clear_page_mlock (struct page *page)
 
void mlock_vma_page (struct page *page)
 
void munlock_vma_page (struct page *page)
 
long mlock_vma_pages_range (struct vm_area_struct *vma, unsigned long start, unsigned long end)
 
void munlock_vma_pages_range (struct vm_area_struct *vma, unsigned long start, unsigned long end)
 
 SYSCALL_DEFINE2 (mlock, unsigned long, start, size_t, len)
 
 SYSCALL_DEFINE2 (munlock, unsigned long, start, size_t, len)
 
 SYSCALL_DEFINE1 (mlockall, int, flags)
 
 SYSCALL_DEFINE0 (munlockall)
 
int user_shm_lock (size_t size, struct user_struct *user)
 
void user_shm_unlock (size_t size, struct user_struct *user)
 

Function Documentation

int can_do_mlock ( void  )

Definition at line 24 of file mlock.c.

void clear_page_mlock ( struct page page)

Definition at line 54 of file mlock.c.

EXPORT_SYMBOL ( can_do_mlock  )
void mlock_vma_page ( struct page page)

Definition at line 77 of file mlock.c.

long mlock_vma_pages_range ( struct vm_area_struct vma,
unsigned long  start,
unsigned long  end 
)

mlock_vma_pages_range() - mlock pages in specified vma range. - the vma containing the specfied address range - starting address in to mlock - end address [+1] in to mlock

For mmap()/mremap()/expansion of mlocked vma.

return 0 on success for "normal" vmas.

return number of pages [> 0] to be removed from locked_vm on success of "special" vmas.

Definition at line 218 of file mlock.c.

void munlock_vma_page ( struct page page)

Definition at line 105 of file mlock.c.

void munlock_vma_pages_range ( struct vm_area_struct vma,
unsigned long  start,
unsigned long  end 
)

Definition at line 273 of file mlock.c.

SYSCALL_DEFINE0 ( munlockall  )

Definition at line 575 of file mlock.c.

SYSCALL_DEFINE1 ( mlockall  ,
int  ,
flags   
)

Definition at line 542 of file mlock.c.

SYSCALL_DEFINE2 ( mlock  ,
unsigned  long,
start  ,
size_t  ,
len   
)

Definition at line 475 of file mlock.c.

SYSCALL_DEFINE2 ( munlock  ,
unsigned  long,
start  ,
size_t  ,
len   
)

Definition at line 505 of file mlock.c.

int user_shm_lock ( size_t  size,
struct user_struct user 
)

Definition at line 591 of file mlock.c.

void user_shm_unlock ( size_t  size,
struct user_struct user 
)

Definition at line 613 of file mlock.c.