diff options
| author | Tony Luck <tony.luck@intel.com> | 2005-05-17 18:53:14 -0400 |
|---|---|---|
| committer | Tony Luck <tony.luck@intel.com> | 2005-05-17 18:53:14 -0400 |
| commit | 325a479c4c110db278ef3361460a48c4093252cc (patch) | |
| tree | bcfbf4d0647d9442045639a5c19da59d55190e81 /ipc | |
| parent | ebcc80c1b6629a445f7471cc1ddb48faf8a84e70 (diff) | |
| parent | 7f9eaedf894dbaa08c157832e9a6c9c03ffed1ed (diff) | |
Merge with temp tree to get David's gdb inferior calls patch
Diffstat (limited to 'ipc')
| -rw-r--r-- | ipc/mqueue.c | 8 | ||||
| -rw-r--r-- | ipc/shm.c | 14 |
2 files changed, 18 insertions, 4 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index cb0cd3cf3b5a..0acf245f441d 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <linux/skbuff.h> | 23 | #include <linux/skbuff.h> |
| 24 | #include <linux/netlink.h> | 24 | #include <linux/netlink.h> |
| 25 | #include <linux/syscalls.h> | 25 | #include <linux/syscalls.h> |
| 26 | #include <linux/signal.h> | ||
| 26 | #include <net/sock.h> | 27 | #include <net/sock.h> |
| 27 | #include "util.h" | 28 | #include "util.h" |
| 28 | 29 | ||
| @@ -767,7 +768,7 @@ static inline void pipelined_send(struct mqueue_inode_info *info, | |||
| 767 | list_del(&receiver->list); | 768 | list_del(&receiver->list); |
| 768 | receiver->state = STATE_PENDING; | 769 | receiver->state = STATE_PENDING; |
| 769 | wake_up_process(receiver->task); | 770 | wake_up_process(receiver->task); |
| 770 | wmb(); | 771 | smp_wmb(); |
| 771 | receiver->state = STATE_READY; | 772 | receiver->state = STATE_READY; |
| 772 | } | 773 | } |
| 773 | 774 | ||
| @@ -786,7 +787,7 @@ static inline void pipelined_receive(struct mqueue_inode_info *info) | |||
| 786 | list_del(&sender->list); | 787 | list_del(&sender->list); |
| 787 | sender->state = STATE_PENDING; | 788 | sender->state = STATE_PENDING; |
| 788 | wake_up_process(sender->task); | 789 | wake_up_process(sender->task); |
| 789 | wmb(); | 790 | smp_wmb(); |
| 790 | sender->state = STATE_READY; | 791 | sender->state = STATE_READY; |
| 791 | } | 792 | } |
| 792 | 793 | ||
| @@ -976,8 +977,7 @@ asmlinkage long sys_mq_notify(mqd_t mqdes, | |||
| 976 | notification.sigev_notify != SIGEV_THREAD)) | 977 | notification.sigev_notify != SIGEV_THREAD)) |
| 977 | return -EINVAL; | 978 | return -EINVAL; |
| 978 | if (notification.sigev_notify == SIGEV_SIGNAL && | 979 | if (notification.sigev_notify == SIGEV_SIGNAL && |
| 979 | (notification.sigev_signo < 0 || | 980 | !valid_signal(notification.sigev_signo)) { |
| 980 | notification.sigev_signo > _NSIG)) { | ||
| 981 | return -EINVAL; | 981 | return -EINVAL; |
| 982 | } | 982 | } |
| 983 | if (notification.sigev_notify == SIGEV_THREAD) { | 983 | if (notification.sigev_notify == SIGEV_THREAD) { |
| @@ -28,6 +28,8 @@ | |||
| 28 | #include <linux/security.h> | 28 | #include <linux/security.h> |
| 29 | #include <linux/syscalls.h> | 29 | #include <linux/syscalls.h> |
| 30 | #include <linux/audit.h> | 30 | #include <linux/audit.h> |
| 31 | #include <linux/ptrace.h> | ||
| 32 | |||
| 31 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
| 32 | 34 | ||
| 33 | #include "util.h" | 35 | #include "util.h" |
| @@ -771,6 +773,18 @@ out: | |||
| 771 | return err; | 773 | return err; |
| 772 | } | 774 | } |
| 773 | 775 | ||
| 776 | asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg) | ||
| 777 | { | ||
| 778 | unsigned long ret; | ||
| 779 | long err; | ||
| 780 | |||
| 781 | err = do_shmat(shmid, shmaddr, shmflg, &ret); | ||
| 782 | if (err) | ||
| 783 | return err; | ||
| 784 | force_successful_syscall_return(); | ||
| 785 | return (long)ret; | ||
| 786 | } | ||
| 787 | |||
| 774 | /* | 788 | /* |
| 775 | * detach and kill segment if marked destroyed. | 789 | * detach and kill segment if marked destroyed. |
| 776 | * The work is done in shm_close. | 790 | * The work is done in shm_close. |
