parport: Use the PCI IRQ if offered
[sfrench/cifs-2.6.git] / include / linux / sem.h
index 6a1af1b49a13f8269e5ac89e46d462fe398594ef..1b191c176bcd33ecfe5f16d41ff53376635e52c0 100644 (file)
@@ -78,6 +78,7 @@ struct  seminfo {
 
 #ifdef __KERNEL__
 #include <asm/atomic.h>
+#include <linux/rcupdate.h>
 
 struct task_struct;
 
@@ -93,23 +94,19 @@ struct sem_array {
        time_t                  sem_otime;      /* last semop time */
        time_t                  sem_ctime;      /* last change time */
        struct sem              *sem_base;      /* ptr to first semaphore in array */
-       struct sem_queue        *sem_pending;   /* pending operations to be processed */
-       struct sem_queue        **sem_pending_last; /* last pending operation */
+       struct list_head        sem_pending;    /* pending operations to be processed */
        struct list_head        list_id;        /* undo requests on this array */
        unsigned long           sem_nsems;      /* no. of semaphores in array */
 };
 
 /* One queue for each sleeping process in the system. */
 struct sem_queue {
-       struct sem_queue *      next;    /* next entry in the queue */
-       struct sem_queue **     prev;    /* previous entry in the queue, *(q->prev) == q */
-       struct task_struct*     sleeper; /* this process */
-       struct sem_undo *       undo;    /* undo structure */
+       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 sem_array *      sma;     /* semaphore array for operations */
-       int                     id;      /* internal sem id */
-       struct sembuf *         sops;    /* array of pending operations */
+       struct sembuf           *sops;   /* array of pending operations */
        int                     nsops;   /* number of operations */
        int                     alter;   /* does the operation alter the array? */
 };
@@ -118,7 +115,10 @@ struct sem_queue {
  * when the process exits.
  */
 struct sem_undo {
-       struct list_head        list_proc;      /* per-process list: all undos from one process */
+       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 */