patch-2.1.2 linux/include/linux/sem.h

Next file: linux/include/linux/shm.h
Previous file: linux/include/linux/proc_fs.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.1/linux/include/linux/sem.h linux/include/linux/sem.h
@@ -1,5 +1,6 @@
 #ifndef _LINUX_SEM_H
 #define _LINUX_SEM_H
+
 #include <linux/ipc.h>
 
 /* semop flags */
@@ -16,43 +17,43 @@
 
 /* One semid data structure for each set of semaphores in the system. */
 struct semid_ds {
-  struct ipc_perm sem_perm;            /* permissions .. see ipc.h */
-  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 sem_undo *undo;	       /* undo requests on this array */
-  ushort          sem_nsems;           /* no. of semaphores in array */
+	struct ipc_perm	sem_perm;		/* permissions .. see ipc.h */
+	__kernel_time_t	sem_otime;		/* last semop time */
+	__kernel_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 sem_undo	*undo;			/* undo requests on this array */
+	unsigned short	sem_nsems;		/* no. of semaphores in array */
 };
 
 /* semop system calls takes an array of these. */
 struct sembuf {
-  ushort  sem_num;        /* semaphore index in array */
-  short   sem_op;         /* semaphore operation */
-  short   sem_flg;        /* operation flags */
+	unsigned short  sem_num;	/* semaphore index in array */
+	short		sem_op;		/* semaphore operation */
+	short		sem_flg;	/* operation flags */
 };
 
 /* arg for semctl system calls. */
 union semun {
-  int val;			/* value for SETVAL */
-  struct semid_ds *buf;		/* buffer for IPC_STAT & IPC_SET */
-  ushort *array;		/* array for GETALL & SETALL */
-  struct seminfo *__buf;	/* buffer for IPC_INFO */
-  void *__pad;
+	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  seminfo {
-    int semmap;
-    int semmni;
-    int semmns;
-    int semmnu;
-    int semmsl;
-    int semopm;
-    int semume;
-    int semusz;
-    int semvmx;
-    int semaem;
+	int semmap;
+	int semmni;
+	int semmns;
+	int semmnu;
+	int semmsl;
+	int semopm;
+	int semume;
+	int semusz;
+	int semvmx;
+	int semaem;
 };
 
 #define SEMMNI  128             /* ?  max # of semaphore identifiers */
@@ -72,8 +73,8 @@
 
 /* One semaphore structure for each semaphore in the system. */
 struct sem {
-  short   semval;         /* current value */
-  short   sempid;         /* pid of last operation */
+	int	semval;		/* current value */
+	int	sempid;		/* pid of last operation */
 };
 
 /* ipcs ctl cmds */
@@ -82,25 +83,25 @@
 
 /* One queue for each semaphore set 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 wait_queue *	sleeper; /* sleeping 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 */
-    struct sembuf *	sops;	 /* array of pending operations */
-    int			nsops;	 /* number of operations */
+	struct sem_queue *	next;	 /* next entry in the queue */
+	struct sem_queue **	prev;	 /* previous entry in the queue, *(q->prev) == q */
+	struct wait_queue *	sleeper; /* sleeping 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 */
+	struct sembuf *		sops;	 /* array of pending operations */
+	int			nsops;	 /* number of operations */
 };
 
 /* Each task has a list of undo requests. They are executed automatically
  * when the process exits.
  */
 struct sem_undo {
-    struct sem_undo *  proc_next; /* next entry on this process */
-    struct sem_undo *  id_next;	  /* next entry on this semaphore set */
-    int		       semid;	  /* semaphore set identifier */
-    short *	       semadj;	  /* array of adjustments, one per semaphore */
+	struct sem_undo *	proc_next;	/* next entry on this process */
+	struct sem_undo *	id_next;	/* next entry on this semaphore set */
+	int			semid;		/* semaphore set identifier */
+	short *			semadj;		/* array of adjustments, one per semaphore */
 };
 
 asmlinkage int sys_semget (key_t key, int nsems, int semflg);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov