diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-02-02 22:05:44 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-02-02 22:05:44 +0000 |
commit | d96372efaaee2dffea3bd4367b8395f3743fcea5 (patch) | |
tree | deb529b20c1d2ee1b3c03ae96469a774894f81d5 | |
parent | fa2948167f9dadfe9fd079f1e278742efae4d89f (diff) | |
download | qemu-d96372efaaee2dffea3bd4367b8395f3743fcea5.zip qemu-d96372efaaee2dffea3bd4367b8395f3743fcea5.tar.gz qemu-d96372efaaee2dffea3bd4367b8395f3743fcea5.tar.bz2 |
sem* and msg* for qemu, part2, by Kirill Shutemov.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2383 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | linux-user/syscall.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 2b37aa8..45c8f29 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1152,6 +1152,35 @@ static long do_ipc(long call, long first, long second, long third, gemu_log("Unsupported ipc call: %ld (version %d)\n", call, version); ret = -ENOSYS; break; + + case IPCOP_msgget: + ret = get_errno(msgget(first, second)); + break; + + case IPCOP_msgsnd: + ret = get_errno(msgsnd(first, (struct msgbuf *) ptr, second, third)); + break; + + case IPCOP_msgctl: + ret = get_errno(msgctl(first, second, (struct msqid_ds *) ptr)); + break; + + case IPCOP_msgrcv: + { + struct ipc_kludge + { + void *__unbounded msgp; + long int msgtyp; + }; + + struct ipc_kludge *foo = (struct ipc_kludge *) ptr; + struct msgbuf *msgp = (struct msgbuf *) foo->msgp; + + ret = get_errno(msgrcv(first, msgp, second, 0, third)); + + } + break; + case IPCOP_shmat: /* SHM_* flags are the same on all linux platforms */ ret = get_errno((long) shmat(first, (void *) ptr, second)); |