Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / include / linux / sem.h
index aaf4576..3c1f112 100644 (file)
@@ -45,10 +45,10 @@ struct sembuf {
 /* arg for semctl system calls. */
 union semun {
        int val;                        /* value for SETVAL */
-       struct semid_ds *buf;           /* buffer for IPC_STAT & IPC_SET */
-       unsigned short *array;          /* array for GETALL & SETALL */
-       struct seminfo *__buf;          /* buffer for IPC_INFO */
-       void *__pad;
+       struct semid_ds __user *buf;    /* buffer for IPC_STAT & IPC_SET */
+       unsigned short __user *array;   /* array for GETALL & SETALL */
+       struct seminfo __user *__buf;   /* buffer for IPC_INFO */
+       void __user *__pad;
 };
 
 struct  seminfo {
@@ -79,6 +79,8 @@ struct  seminfo {
 
 #ifdef __KERNEL__
 
+struct task_struct;
+
 /* One semaphore structure for each semaphore in the system. */
 struct sem {
        int     semval;         /* current value */
@@ -88,6 +90,7 @@ struct sem {
 /* One sem_array data structure for each set of semaphores in the system. */
 struct sem_array {
        struct kern_ipc_perm    sem_perm;       /* permissions .. see ipc.h */
+       int                     sem_id;
        time_t                  sem_otime;      /* last semop time */
        time_t                  sem_ctime;      /* last change time */
        struct sem              *sem_base;      /* ptr to first semaphore in array */
@@ -109,6 +112,7 @@ struct sem_queue {
        int                     id;      /* internal sem id */
        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