Commit d96372efaaee2dffea3bd4367b8395f3743fcea5

Authored by ths
1 parent fa294816

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
Showing 1 changed file with 29 additions and 0 deletions
linux-user/syscall.c
@@ -1152,6 +1152,35 @@ static long do_ipc(long call, long first, long second, long third, @@ -1152,6 +1152,35 @@ static long do_ipc(long call, long first, long second, long third,
1152 gemu_log("Unsupported ipc call: %ld (version %d)\n", call, version); 1152 gemu_log("Unsupported ipc call: %ld (version %d)\n", call, version);
1153 ret = -ENOSYS; 1153 ret = -ENOSYS;
1154 break; 1154 break;
  1155 +
  1156 + case IPCOP_msgget:
  1157 + ret = get_errno(msgget(first, second));
  1158 + break;
  1159 +
  1160 + case IPCOP_msgsnd:
  1161 + ret = get_errno(msgsnd(first, (struct msgbuf *) ptr, second, third));
  1162 + break;
  1163 +
  1164 + case IPCOP_msgctl:
  1165 + ret = get_errno(msgctl(first, second, (struct msqid_ds *) ptr));
  1166 + break;
  1167 +
  1168 + case IPCOP_msgrcv:
  1169 + {
  1170 + struct ipc_kludge
  1171 + {
  1172 + void *__unbounded msgp;
  1173 + long int msgtyp;
  1174 + };
  1175 +
  1176 + struct ipc_kludge *foo = (struct ipc_kludge *) ptr;
  1177 + struct msgbuf *msgp = (struct msgbuf *) foo->msgp;
  1178 +
  1179 + ret = get_errno(msgrcv(first, msgp, second, 0, third));
  1180 +
  1181 + }
  1182 + break;
  1183 +
1155 case IPCOP_shmat: 1184 case IPCOP_shmat:
1156 /* SHM_* flags are the same on all linux platforms */ 1185 /* SHM_* flags are the same on all linux platforms */
1157 ret = get_errno((long) shmat(first, (void *) ptr, second)); 1186 ret = get_errno((long) shmat(first, (void *) ptr, second));