From: ths Date: Fri, 2 Feb 2007 22:05:44 +0000 (+0000) Subject: sem* and msg* for qemu, part2, by Kirill Shutemov. X-Git-Tag: release_0_9_1~1512 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=08b71cf09f5256e159f525eb904119697b0245aa;p=qemu-xen-unstable.git sem* and msg* for qemu, part2, by Kirill Shutemov. --- diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 2b37aa809c..45c8f29397 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));