Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
sem.c File Reference
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/init.h>
#include <linux/proc_fs.h>
#include <linux/time.h>
#include <linux/security.h>
#include <linux/syscalls.h>
#include <linux/audit.h>
#include <linux/capability.h>
#include <linux/seq_file.h>
#include <linux/rwsem.h>
#include <linux/nsproxy.h>
#include <linux/ipc_namespace.h>
#include <asm/uaccess.h>
#include "util.h"

Go to the source code of this file.

Data Structures

struct  sem
 
struct  sem_queue
 
struct  sem_undo
 
struct  sem_undo_list
 

Macros

#define sem_ids(ns)   ((ns)->ids[IPC_SEM_IDS])
 
#define sem_unlock(sma)   ipc_unlock(&(sma)->sem_perm)
 
#define sem_checkid(sma, semid)   ipc_checkid(&sma->sem_perm, semid)
 
#define SEMMSL_FAST   256 /* 512 bytes on stack */
 
#define SEMOPM_FAST   64 /* ~ 372 bytes on stack */
 
#define sc_semmsl   sem_ctls[0]
 
#define sc_semmns   sem_ctls[1]
 
#define sc_semopm   sem_ctls[2]
 
#define sc_semmni   sem_ctls[3]
 
#define IN_WAKEUP   1
 

Functions

void sem_init_ns (struct ipc_namespace *ns)
 
void __init sem_init (void)
 
 SYSCALL_DEFINE3 (semget, key_t, key, int, nsems, int, semflg)
 
SYSCALL_DEFINE() semctl (int semid, int semnum, int cmd, union semun arg)
 
 SYSCALL_DEFINE4 (semtimedop, int, semid, struct sembuf __user *, tsops, unsigned, nsops, const struct timespec __user *, timeout)
 
 SYSCALL_DEFINE3 (semop, int, semid, struct sembuf __user *, tsops, unsigned, nsops)
 
int copy_semundo (unsigned long clone_flags, struct task_struct *tsk)
 
void exit_sem (struct task_struct *tsk)
 

Macro Definition Documentation

#define IN_WAKEUP   1

Definition at line 274 of file sem.c.

#define sc_semmni   sem_ctls[3]

Definition at line 165 of file sem.c.

#define sc_semmns   sem_ctls[1]

Definition at line 163 of file sem.c.

#define sc_semmsl   sem_ctls[0]

Definition at line 162 of file sem.c.

#define sc_semopm   sem_ctls[2]

Definition at line 164 of file sem.c.

#define sem_checkid (   sma,
  semid 
)    ipc_checkid(&sma->sem_perm, semid)

Definition at line 142 of file sem.c.

#define sem_ids (   ns)    ((ns)->ids[IPC_SEM_IDS])

Definition at line 139 of file sem.c.

#define sem_unlock (   sma)    ipc_unlock(&(sma)->sem_perm)

Definition at line 141 of file sem.c.

#define SEMMSL_FAST   256 /* 512 bytes on stack */

Definition at line 150 of file sem.c.

#define SEMOPM_FAST   64 /* ~ 372 bytes on stack */

Definition at line 151 of file sem.c.

Function Documentation

int copy_semundo ( unsigned long  clone_flags,
struct task_struct tsk 
)

Definition at line 1560 of file sem.c.

void exit_sem ( struct task_struct tsk)

Definition at line 1589 of file sem.c.

void __init sem_init ( void  )

Definition at line 185 of file sem.c.

void sem_init_ns ( struct ipc_namespace ns)

Definition at line 167 of file sem.c.

SYSCALL_DEFINE() semctl ( int  semid,
int  semnum,
int  cmd,
union semun  arg 
)

Definition at line 1123 of file sem.c.

SYSCALL_DEFINE3 ( semget  ,
key_t  ,
key  ,
int  ,
nsems  ,
int  ,
semflg   
)

Definition at line 367 of file sem.c.

SYSCALL_DEFINE3 ( semop  ,
int  ,
semid  ,
struct sembuf __user ,
tsops  ,
unsigned  ,
nsops   
)

Definition at line 1550 of file sem.c.

SYSCALL_DEFINE4 ( semtimedop  ,
int  ,
semid  ,
struct sembuf __user ,
tsops  ,
unsigned  ,
nsops  ,
const struct timespec __user ,
timeout   
)

Definition at line 1332 of file sem.c.