Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ashmem.c File Reference
#include <linux/module.h>
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/falloc.h>
#include <linux/miscdevice.h>
#include <linux/security.h>
#include <linux/mm.h>
#include <linux/mman.h>
#include <linux/uaccess.h>
#include <linux/personality.h>
#include <linux/bitops.h>
#include <linux/mutex.h>
#include <linux/shmem_fs.h>
#include "ashmem.h"

Go to the source code of this file.

Data Structures

struct  ashmem_area
 
struct  ashmem_range
 

Macros

#define pr_fmt(fmt)   "ashmem: " fmt
 
#define ASHMEM_NAME_PREFIX   "dev/ashmem/"
 
#define ASHMEM_NAME_PREFIX_LEN   (sizeof(ASHMEM_NAME_PREFIX) - 1)
 
#define ASHMEM_FULL_NAME_LEN   (ASHMEM_NAME_LEN + ASHMEM_NAME_PREFIX_LEN)
 
#define range_size(range)   ((range)->pgend - (range)->pgstart + 1)
 
#define range_on_lru(range)   ((range)->purged == ASHMEM_NOT_PURGED)
 
#define page_range_subsumes_range(range, start, end)   (((range)->pgstart >= (start)) && ((range)->pgend <= (end)))
 
#define page_range_subsumed_by_range(range, start, end)   (((range)->pgstart <= (start)) && ((range)->pgend >= (end)))
 
#define page_in_range(range, page)   (((range)->pgstart <= (page)) && ((range)->pgend >= (page)))
 
#define page_range_in_range(range, start, end)
 
#define range_before_page(range, page)   ((range)->pgend < (page))
 
#define PROT_MASK   (PROT_EXEC | PROT_READ | PROT_WRITE)
 

Functions

 module_init (ashmem_init)
 
 module_exit (ashmem_exit)
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define ASHMEM_FULL_NAME_LEN   (ASHMEM_NAME_LEN + ASHMEM_NAME_PREFIX_LEN)

Definition at line 38 of file ashmem.c.

#define ASHMEM_NAME_PREFIX   "dev/ashmem/"

Definition at line 36 of file ashmem.c.

#define ASHMEM_NAME_PREFIX_LEN   (sizeof(ASHMEM_NAME_PREFIX) - 1)

Definition at line 37 of file ashmem.c.

#define page_in_range (   range,
  page 
)    (((range)->pgstart <= (page)) && ((range)->pgend >= (page)))

Definition at line 96 of file ashmem.c.

#define page_range_in_range (   range,
  start,
  end 
)
Value:
page_range_subsumes_range(range, start, end))

Definition at line 99 of file ashmem.c.

#define page_range_subsumed_by_range (   range,
  start,
  end 
)    (((range)->pgstart <= (start)) && ((range)->pgend >= (end)))

Definition at line 93 of file ashmem.c.

#define page_range_subsumes_range (   range,
  start,
  end 
)    (((range)->pgstart >= (start)) && ((range)->pgend <= (end)))

Definition at line 90 of file ashmem.c.

#define pr_fmt (   fmt)    "ashmem: " fmt

Definition at line 19 of file ashmem.c.

#define PROT_MASK   (PROT_EXEC | PROT_READ | PROT_WRITE)

Definition at line 106 of file ashmem.c.

#define range_before_page (   range,
  page 
)    ((range)->pgend < (page))

Definition at line 103 of file ashmem.c.

#define range_on_lru (   range)    ((range)->purged == ASHMEM_NOT_PURGED)

Definition at line 87 of file ashmem.c.

#define range_size (   range)    ((range)->pgend - (range)->pgstart + 1)

Definition at line 84 of file ashmem.c.

Function Documentation

module_exit ( ashmem_exit  )
module_init ( ashmem_init  )
MODULE_LICENSE ( "GPL"  )