summaryrefslogtreecommitdiff
path: root/include/linux/sem.h
diff options
context:
space:
mode:
authorAnton Vorontsov <cbouatmailru@gmail.com>2012-01-04 05:09:35 (GMT)
committerAnton Vorontsov <cbouatmailru@gmail.com>2012-01-04 05:09:35 (GMT)
commit251f39fe42dae863bd24e30864e6b66076ba076d (patch)
treec804944bc17f3836d19cc8b5bc611dd1fb0ea915 /include/linux/sem.h
parent9b8872273af6983b246252a6508fa7cf34c69d6e (diff)
parent35b4c01e29bdd9632dabf9784ed3486333f00427 (diff)
downloadlinux-fsl-qoriq-251f39fe42dae863bd24e30864e6b66076ba076d.tar.xz
Merge branch 'power-supply-scope' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen
Diffstat (limited to 'include/linux/sem.h')
-rw-r--r--include/linux/sem.h49
1 files changed, 6 insertions, 43 deletions
diff --git a/include/linux/sem.h b/include/linux/sem.h
index 1feb2de..10d6b22 100644
--- a/include/linux/sem.h
+++ b/include/linux/sem.h
@@ -83,13 +83,6 @@ struct seminfo {
struct task_struct;
-/* One semaphore structure for each semaphore in the system. */
-struct sem {
- int semval; /* current value */
- int sempid; /* pid of last operation */
- struct list_head sem_pending; /* pending single-sop operations */
-};
-
/* One sem_array data structure for each set of semaphores in the system. */
struct sem_array {
struct kern_ipc_perm ____cacheline_aligned_in_smp
@@ -103,51 +96,21 @@ struct sem_array {
int complex_count; /* pending complex operations */
};
-/* One queue for each sleeping process in the system. */
-struct sem_queue {
- struct list_head simple_list; /* queue of pending operations */
- struct list_head list; /* queue of pending operations */
- struct task_struct *sleeper; /* this process */
- struct sem_undo *undo; /* undo structure */
- int pid; /* process id of requesting process */
- int status; /* completion status of operation */
- struct sembuf *sops; /* array of pending operations */
- int nsops; /* number of operations */
- int alter; /* does the operation alter the array? */
-};
-
-/* Each task has a list of undo requests. They are executed automatically
- * when the process exits.
- */
-struct sem_undo {
- struct list_head list_proc; /* per-process list: all undos from one process. */
- /* rcu protected */
- struct rcu_head rcu; /* rcu struct for sem_undo() */
- struct sem_undo_list *ulp; /* sem_undo_list for the process */
- struct list_head list_id; /* per semaphore array list: all undos for one array */
- int semid; /* semaphore set identifier */
- short * semadj; /* array of adjustments, one per semaphore */
-};
-
-/* sem_undo_list controls shared access to the list of sem_undo structures
- * that may be shared among all a CLONE_SYSVSEM task group.
- */
-struct sem_undo_list {
- atomic_t refcnt;
- spinlock_t lock;
- struct list_head list_proc;
-};
+#ifdef CONFIG_SYSVIPC
struct sysv_sem {
struct sem_undo_list *undo_list;
};
-#ifdef CONFIG_SYSVIPC
-
extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk);
extern void exit_sem(struct task_struct *tsk);
#else
+
+struct sysv_sem {
+ /* empty */
+};
+
static inline int copy_semundo(unsigned long clone_flags, struct task_struct *tsk)
{
return 0;