aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-01-22 04:03:02 -0500
committerThomas Gleixner <tglx@linutronix.de>2009-01-22 04:03:02 -0500
commit6552ebae25ffd57574c6e72d17fce67fea08b918 (patch)
treecde6cc932c7e47d818154b011dfd8a6997d5c18e /ipc
parent749a440b2218e9937dca8c68e23e51ca4d8d37fe (diff)
parent336f6c322d87806ef93afad6308ac65083a865e5 (diff)
Merge branch 'core/debugobjects' into core/urgent
Diffstat (limited to 'ipc')
-rw-r--r--ipc/mqueue.c28
-rw-r--r--ipc/msg.c12
-rw-r--r--ipc/sem.c18
-rw-r--r--ipc/shm.c8
4 files changed, 37 insertions, 29 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 23fdb8492b8e..54b4077fed79 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -650,8 +650,8 @@ static struct file *do_open(struct dentry *dentry, int oflag)
650 return dentry_open(dentry, mqueue_mnt, oflag, cred); 650 return dentry_open(dentry, mqueue_mnt, oflag, cred);
651} 651}
652 652
653asmlinkage long sys_mq_open(const char __user *u_name, int oflag, mode_t mode, 653SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, mode_t, mode,
654 struct mq_attr __user *u_attr) 654 struct mq_attr __user *, u_attr)
655{ 655{
656 struct dentry *dentry; 656 struct dentry *dentry;
657 struct file *filp; 657 struct file *filp;
@@ -721,7 +721,7 @@ out_putname:
721 return fd; 721 return fd;
722} 722}
723 723
724asmlinkage long sys_mq_unlink(const char __user *u_name) 724SYSCALL_DEFINE1(mq_unlink, const char __user *, u_name)
725{ 725{
726 int err; 726 int err;
727 char *name; 727 char *name;
@@ -814,9 +814,9 @@ static inline void pipelined_receive(struct mqueue_inode_info *info)
814 sender->state = STATE_READY; 814 sender->state = STATE_READY;
815} 815}
816 816
817asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *u_msg_ptr, 817SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqdes, const char __user *, u_msg_ptr,
818 size_t msg_len, unsigned int msg_prio, 818 size_t, msg_len, unsigned int, msg_prio,
819 const struct timespec __user *u_abs_timeout) 819 const struct timespec __user *, u_abs_timeout)
820{ 820{
821 struct file *filp; 821 struct file *filp;
822 struct inode *inode; 822 struct inode *inode;
@@ -907,9 +907,9 @@ out:
907 return ret; 907 return ret;
908} 908}
909 909
910asmlinkage ssize_t sys_mq_timedreceive(mqd_t mqdes, char __user *u_msg_ptr, 910SYSCALL_DEFINE5(mq_timedreceive, mqd_t, mqdes, char __user *, u_msg_ptr,
911 size_t msg_len, unsigned int __user *u_msg_prio, 911 size_t, msg_len, unsigned int __user *, u_msg_prio,
912 const struct timespec __user *u_abs_timeout) 912 const struct timespec __user *, u_abs_timeout)
913{ 913{
914 long timeout; 914 long timeout;
915 ssize_t ret; 915 ssize_t ret;
@@ -997,8 +997,8 @@ out:
997 * and he isn't currently owner of notification, will be silently discarded. 997 * and he isn't currently owner of notification, will be silently discarded.
998 * It isn't explicitly defined in the POSIX. 998 * It isn't explicitly defined in the POSIX.
999 */ 999 */
1000asmlinkage long sys_mq_notify(mqd_t mqdes, 1000SYSCALL_DEFINE2(mq_notify, mqd_t, mqdes,
1001 const struct sigevent __user *u_notification) 1001 const struct sigevent __user *, u_notification)
1002{ 1002{
1003 int ret; 1003 int ret;
1004 struct file *filp; 1004 struct file *filp;
@@ -1123,9 +1123,9 @@ out:
1123 return ret; 1123 return ret;
1124} 1124}
1125 1125
1126asmlinkage long sys_mq_getsetattr(mqd_t mqdes, 1126SYSCALL_DEFINE3(mq_getsetattr, mqd_t, mqdes,
1127 const struct mq_attr __user *u_mqstat, 1127 const struct mq_attr __user *, u_mqstat,
1128 struct mq_attr __user *u_omqstat) 1128 struct mq_attr __user *, u_omqstat)
1129{ 1129{
1130 int ret; 1130 int ret;
1131 struct mq_attr mqstat, omqstat; 1131 struct mq_attr mqstat, omqstat;
diff --git a/ipc/msg.c b/ipc/msg.c
index b4eee1c6101d..2ceab7f12fcb 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -309,7 +309,7 @@ static inline int msg_security(struct kern_ipc_perm *ipcp, int msgflg)
309 return security_msg_queue_associate(msq, msgflg); 309 return security_msg_queue_associate(msq, msgflg);
310} 310}
311 311
312asmlinkage long sys_msgget(key_t key, int msgflg) 312SYSCALL_DEFINE2(msgget, key_t, key, int, msgflg)
313{ 313{
314 struct ipc_namespace *ns; 314 struct ipc_namespace *ns;
315 struct ipc_ops msg_ops; 315 struct ipc_ops msg_ops;
@@ -466,7 +466,7 @@ out_up:
466 return err; 466 return err;
467} 467}
468 468
469asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf) 469SYSCALL_DEFINE3(msgctl, int, msqid, int, cmd, struct msqid_ds __user *, buf)
470{ 470{
471 struct msg_queue *msq; 471 struct msg_queue *msq;
472 int err, version; 472 int err, version;
@@ -723,8 +723,8 @@ out_free:
723 return err; 723 return err;
724} 724}
725 725
726asmlinkage long 726SYSCALL_DEFINE4(msgsnd, int, msqid, struct msgbuf __user *, msgp, size_t, msgsz,
727sys_msgsnd(int msqid, struct msgbuf __user *msgp, size_t msgsz, int msgflg) 727 int, msgflg)
728{ 728{
729 long mtype; 729 long mtype;
730 730
@@ -904,8 +904,8 @@ out_unlock:
904 return msgsz; 904 return msgsz;
905} 905}
906 906
907asmlinkage long sys_msgrcv(int msqid, struct msgbuf __user *msgp, size_t msgsz, 907SYSCALL_DEFINE5(msgrcv, int, msqid, struct msgbuf __user *, msgp, size_t, msgsz,
908 long msgtyp, int msgflg) 908 long, msgtyp, int, msgflg)
909{ 909{
910 long err, mtype; 910 long err, mtype;
911 911
diff --git a/ipc/sem.c b/ipc/sem.c
index c68cd3f8f0c9..16a2189e96f9 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -308,7 +308,7 @@ static inline int sem_more_checks(struct kern_ipc_perm *ipcp,
308 return 0; 308 return 0;
309} 309}
310 310
311asmlinkage long sys_semget(key_t key, int nsems, int semflg) 311SYSCALL_DEFINE3(semget, key_t, key, int, nsems, int, semflg)
312{ 312{
313 struct ipc_namespace *ns; 313 struct ipc_namespace *ns;
314 struct ipc_ops sem_ops; 314 struct ipc_ops sem_ops;
@@ -887,7 +887,7 @@ out_up:
887 return err; 887 return err;
888} 888}
889 889
890asmlinkage long sys_semctl (int semid, int semnum, int cmd, union semun arg) 890SYSCALL_DEFINE(semctl)(int semid, int semnum, int cmd, union semun arg)
891{ 891{
892 int err = -EINVAL; 892 int err = -EINVAL;
893 int version; 893 int version;
@@ -923,6 +923,13 @@ asmlinkage long sys_semctl (int semid, int semnum, int cmd, union semun arg)
923 return -EINVAL; 923 return -EINVAL;
924 } 924 }
925} 925}
926#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS
927asmlinkage long SyS_semctl(int semid, int semnum, int cmd, union semun arg)
928{
929 return SYSC_semctl((int) semid, (int) semnum, (int) cmd, arg);
930}
931SYSCALL_ALIAS(sys_semctl, SyS_semctl);
932#endif
926 933
927/* If the task doesn't already have a undo_list, then allocate one 934/* If the task doesn't already have a undo_list, then allocate one
928 * here. We guarantee there is only one thread using this undo list, 935 * here. We guarantee there is only one thread using this undo list,
@@ -1048,8 +1055,8 @@ out:
1048 return un; 1055 return un;
1049} 1056}
1050 1057
1051asmlinkage long sys_semtimedop(int semid, struct sembuf __user *tsops, 1058SYSCALL_DEFINE4(semtimedop, int, semid, struct sembuf __user *, tsops,
1052 unsigned nsops, const struct timespec __user *timeout) 1059 unsigned, nsops, const struct timespec __user *, timeout)
1053{ 1060{
1054 int error = -EINVAL; 1061 int error = -EINVAL;
1055 struct sem_array *sma; 1062 struct sem_array *sma;
@@ -1225,7 +1232,8 @@ out_free:
1225 return error; 1232 return error;
1226} 1233}
1227 1234
1228asmlinkage long sys_semop (int semid, struct sembuf __user *tsops, unsigned nsops) 1235SYSCALL_DEFINE3(semop, int, semid, struct sembuf __user *, tsops,
1236 unsigned, nsops)
1229{ 1237{
1230 return sys_semtimedop(semid, tsops, nsops, NULL); 1238 return sys_semtimedop(semid, tsops, nsops, NULL);
1231} 1239}
diff --git a/ipc/shm.c b/ipc/shm.c
index d0ab5527bf45..a9e09ad2263e 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -440,7 +440,7 @@ static inline int shm_more_checks(struct kern_ipc_perm *ipcp,
440 return 0; 440 return 0;
441} 441}
442 442
443asmlinkage long sys_shmget (key_t key, size_t size, int shmflg) 443SYSCALL_DEFINE3(shmget, key_t, key, size_t, size, int, shmflg)
444{ 444{
445 struct ipc_namespace *ns; 445 struct ipc_namespace *ns;
446 struct ipc_ops shm_ops; 446 struct ipc_ops shm_ops;
@@ -621,7 +621,7 @@ out_up:
621 return err; 621 return err;
622} 622}
623 623
624asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf) 624SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf)
625{ 625{
626 struct shmid_kernel *shp; 626 struct shmid_kernel *shp;
627 int err, version; 627 int err, version;
@@ -939,7 +939,7 @@ out_put_dentry:
939 goto out_nattch; 939 goto out_nattch;
940} 940}
941 941
942asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg) 942SYSCALL_DEFINE3(shmat, int, shmid, char __user *, shmaddr, int, shmflg)
943{ 943{
944 unsigned long ret; 944 unsigned long ret;
945 long err; 945 long err;
@@ -955,7 +955,7 @@ asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg)
955 * detach and kill segment if marked destroyed. 955 * detach and kill segment if marked destroyed.
956 * The work is done in shm_close. 956 * The work is done in shm_close.
957 */ 957 */
958asmlinkage long sys_shmdt(char __user *shmaddr) 958SYSCALL_DEFINE1(shmdt, char __user *, shmaddr)
959{ 959{
960 struct mm_struct *mm = current->mm; 960 struct mm_struct *mm = current->mm;
961 struct vm_area_struct *vma, *next; 961 struct vm_area_struct *vma, *next;