summaryrefslogtreecommitdiffstats
path: root/include/linux/sem.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sem.h')
-rw-r--r--include/linux/sem.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/include/linux/sem.h b/include/linux/sem.h
index 6f6677a64..234d4eebf 100644
--- a/include/linux/sem.h
+++ b/include/linux/sem.h
@@ -60,11 +60,11 @@ struct seminfo {
int semaem;
};
-#define SEMMNI 128 /* ? max # of semaphore identifiers */
-#define SEMMSL 32 /* <= 512 max num of semaphores per id */
-#define SEMMNS (SEMMNI*SEMMSL) /* ? max # of semaphores in system */
-#define SEMOPM 32 /* ~ 100 max num of ops per semop call */
-#define SEMVMX 32767 /* semaphore maximum value */
+#define SEMMNI 128 /* <= IPCMNI max # of semaphore identifiers */
+#define SEMMSL 250 /* <= 8 000 max num of semaphores per id */
+#define SEMMNS (SEMMNI*SEMMSL) /* <= INT_MAX max # of semaphores in system */
+#define SEMOPM 32 /* <= 1 000 max num of ops per semop call */
+#define SEMVMX 32767 /* <= 32767 semaphore maximum value */
/* unused */
#define SEMUME SEMOPM /* max num of undo entries per process */
@@ -81,15 +81,16 @@ struct sem {
int sempid; /* pid of last operation */
};
-/* One queue for each semaphore set in the system. */
+/* 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 */
- wait_queue_head_t sleeper; /* sleeping process */
+ 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 semid_ds * sma; /* semaphore array for operations */
+ int id; /* internal sem id */
struct sembuf * sops; /* array of pending operations */
int nsops; /* number of operations */
int alter; /* operation will alter semaphore */