fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / include / linux / sem.h
index c365f79..9aaffb0 100644 (file)
@@ -2,7 +2,6 @@
 #define _LINUX_SEM_H
 
 #include <linux/ipc.h>
-#include <asm/atomic.h>
 
 /* semop flags */
 #define SEM_UNDO        0x1000  /* undo the operation on exit */
@@ -78,6 +77,9 @@ struct  seminfo {
 #define SEMUSZ  20             /* sizeof struct sem_undo */
 
 #ifdef __KERNEL__
+#include <asm/atomic.h>
+
+struct task_struct;
 
 /* One semaphore structure for each semaphore in the system. */
 struct sem {
@@ -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