aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sem.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-13 13:28:32 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-13 13:28:32 -0700
commit0b381a286e5d748b1fd80095d3dd52326819742f (patch)
treed72fca56123520b9c78661137f8a02b6ad26f95b /include/linux/sem.h
parentMerge tag 'disintegrate-spi-20121009' of git://git.infradead.org/users/dhowells/linux-headers (diff)
parentUAPI: (Scripted) Disintegrate include/linux/byteorder (diff)
downloadlinux-dev-0b381a286e5d748b1fd80095d3dd52326819742f.tar.xz
linux-dev-0b381a286e5d748b1fd80095d3dd52326819742f.zip
Merge tag 'disintegrate-main-20121013' of git://git.infradead.org/users/dhowells/linux-headers
Pull UAPI disintegration for include/linux/{,byteorder/}*.h from David Howells: "The patches contained herein do the following: (1) Remove kernel-only stuff in linux/ppp-comp.h from the UAPI. I checked this with Paul Mackerras before I created the patch and he suggested some extra bits to unexport. (2) Remove linux/blk_types.h entirely from the UAPI as none of it is userspace applicable, and remove from the UAPI that part of linux/fs.h that was the reason for linux/blk_types.h being exported in the first place. I discussed this with Jens Axboe before creating the patch. (3) The big patch of the series to disintegrate include/linux/*.h as a unit. This could be split up, though there would be collisions in moving stuff between the two Kbuild files when the parts are merged as that file is sorted alphabetically rather than being grouped by subsystem. Of this set of headers, 17 files have changed in the UAPI exported region since the 4th and only 8 since the 9th so there isn't much change in this area - as one might expect. It should be pretty obvious and straightforward if it does come to fixing up: stuff in __KERNEL__ guards stays where it is and stuff outside moves to the same file in the include/uapi/linux/ directory. If a new file appears then things get a bit more complicated as the "headers +=" line has to move to include/uapi/linux/Kbuild. Only one new file has appeared since the 9th and I judge this type of event relatively unlikely. (4) A patch to disintegrate include/linux/byteorder/*.h as a unit. Signed-off-by: David Howells <dhowells@redhat.com>" * tag 'disintegrate-main-20121013' of git://git.infradead.org/users/dhowells/linux-headers: UAPI: (Scripted) Disintegrate include/linux/byteorder UAPI: (Scripted) Disintegrate include/linux UAPI: Unexport linux/blk_types.h UAPI: Unexport part of linux/ppp-comp.h
Diffstat (limited to 'include/linux/sem.h')
-rw-r--r--include/linux/sem.h79
1 files changed, 1 insertions, 78 deletions
diff --git a/include/linux/sem.h b/include/linux/sem.h
index 10d6b226afc5..53d42650b193 100644
--- a/include/linux/sem.h
+++ b/include/linux/sem.h
@@ -1,85 +1,10 @@
#ifndef _LINUX_SEM_H
#define _LINUX_SEM_H
-#include <linux/ipc.h>
-
-/* semop flags */
-#define SEM_UNDO 0x1000 /* undo the operation on exit */
-
-/* semctl Command Definitions. */
-#define GETPID 11 /* get sempid */
-#define GETVAL 12 /* get semval */
-#define GETALL 13 /* get all semval's */
-#define GETNCNT 14 /* get semncnt */
-#define GETZCNT 15 /* get semzcnt */
-#define SETVAL 16 /* set semval */
-#define SETALL 17 /* set all semval's */
-
-/* ipcs ctl cmds */
-#define SEM_STAT 18
-#define SEM_INFO 19
-
-/* Obsolete, used only for backwards compatibility and libc5 compiles */
-struct semid_ds {
- 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 */
-};
-
-/* Include the definition of semid64_ds */
-#include <asm/sembuf.h>
-
-/* semop system calls takes an array of these. */
-struct sembuf {
- 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 __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 {
- int semmap;
- int semmni;
- int semmns;
- int semmnu;
- int semmsl;
- int semopm;
- int semume;
- int semusz;
- int semvmx;
- int semaem;
-};
-
-#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 */
-#define SEMAEM SEMVMX /* adjust on exit max value */
-
-/* unused */
-#define SEMUME SEMOPM /* max num of undo entries per process */
-#define SEMMNU SEMMNS /* num of undo structures system wide */
-#define SEMMAP SEMMNS /* # of entries in semaphore map */
-#define SEMUSZ 20 /* sizeof struct sem_undo */
-
-#ifdef __KERNEL__
#include <linux/atomic.h>
#include <linux/rcupdate.h>
#include <linux/cache.h>
+#include <uapi/linux/sem.h>
struct task_struct;
@@ -122,6 +47,4 @@ static inline void exit_sem(struct task_struct *tsk)
}
#endif
-#endif /* __KERNEL__ */
-
#endif /* _LINUX_SEM_H */