Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
shm.c File Reference
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/hugetlb.h>
#include <linux/shm.h>
#include <linux/init.h>
#include <linux/file.h>
#include <linux/mman.h>
#include <linux/shmem_fs.h>
#include <linux/security.h>
#include <linux/syscalls.h>
#include <linux/audit.h>
#include <linux/capability.h>
#include <linux/ptrace.h>
#include <linux/seq_file.h>
#include <linux/rwsem.h>
#include <linux/nsproxy.h>
#include <linux/mount.h>
#include <linux/ipc_namespace.h>
#include <asm/uaccess.h>
#include "util.h"

Go to the source code of this file.

Data Structures

struct  shm_file_data
 

Macros

#define shm_file_data(file)   (*((struct shm_file_data **)&(file)->private_data))
 
#define shm_ids(ns)   ((ns)->ids[IPC_SHM_IDS])
 
#define shm_unlock(shp)   ipc_unlock(&(shp)->shm_perm)
 

Functions

void shm_init_ns (struct ipc_namespace *ns)
 
 pure_initcall (ipc_ns_init)
 
void __init shm_init (void)
 
void shm_destroy_orphaned (struct ipc_namespace *ns)
 
void exit_shm (struct task_struct *task)
 
int is_file_shm_hugepages (struct file *file)
 
 SYSCALL_DEFINE3 (shmget, key_t, key, size_t, size, int, shmflg)
 
 SYSCALL_DEFINE3 (shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf)
 
long do_shmat (int shmid, char __user *shmaddr, int shmflg, ulong *raddr, unsigned long shmlba)
 
 SYSCALL_DEFINE3 (shmat, int, shmid, char __user *, shmaddr, int, shmflg)
 
 SYSCALL_DEFINE1 (shmdt, char __user *, shmaddr)
 

Macro Definition Documentation

#define shm_file_data (   file)    (*((struct shm_file_data **)&(file)->private_data))

Definition at line 54 of file shm.c.

#define shm_ids (   ns)    ((ns)->ids[IPC_SHM_IDS])

Definition at line 59 of file shm.c.

#define shm_unlock (   shp)    ipc_unlock(&(shp)->shm_perm)

Definition at line 61 of file shm.c.

Function Documentation

long do_shmat ( int  shmid,
char __user shmaddr,
int  shmflg,
ulong raddr,
unsigned long  shmlba 
)

Definition at line 958 of file shm.c.

void exit_shm ( struct task_struct task)

Definition at line 310 of file shm.c.

int is_file_shm_hugepages ( struct file file)

Definition at line 435 of file shm.c.

pure_initcall ( ipc_ns_init  )
void shm_destroy_orphaned ( struct ipc_namespace ns)

Definition at line 301 of file shm.c.

void __init shm_init ( void  )

Definition at line 116 of file shm.c.

void shm_init_ns ( struct ipc_namespace ns)

Definition at line 72 of file shm.c.

SYSCALL_DEFINE1 ( shmdt  ,
char __user ,
shmaddr   
)

Definition at line 1124 of file shm.c.

SYSCALL_DEFINE3 ( shmget  ,
key_t  ,
key  ,
size_t  ,
size  ,
int  ,
shmflg   
)

Definition at line 574 of file shm.c.

SYSCALL_DEFINE3 ( shmctl  ,
int  ,
shmid  ,
int  ,
cmd  ,
struct shmid_ds __user ,
buf   
)

Definition at line 776 of file shm.c.

SYSCALL_DEFINE3 ( shmat  ,
int  ,
shmid  ,
char __user ,
shmaddr  ,
int  ,
shmflg   
)

Definition at line 1108 of file shm.c.