Added ipc save/restore for page-fault ipcs.

The save restore routines save all primary message registers and ipc flags.
This commit is contained in:
Bahadir Balban
2009-05-28 12:52:14 +03:00
parent 391b0ca1d0
commit ba31e1b823
3 changed files with 86 additions and 28 deletions

View File

@@ -506,29 +506,38 @@ static inline int __sys_ipc(l4id_t to, l4id_t from,
{
int ret;
switch (ipc_type) {
case IPC_SEND:
if (flags & IPC_FLAGS_EXTENDED)
if (ipc_flags_get_type(flags) == IPC_FLAGS_EXTENDED) {
switch (ipc_type) {
case IPC_SEND:
ret = ipc_send_extended(to, flags);
else
ret = ipc_send(to, flags);
break;
case IPC_RECV:
if (flags & IPC_FLAGS_EXTENDED)
break;
case IPC_RECV:
ret = ipc_recv_extended(from, flags);
else
ret = ipc_recv(from, flags);
break;
case IPC_SENDRECV:
if (flags & IPC_FLAGS_EXTENDED)
break;
case IPC_SENDRECV:
ret = ipc_sendrecv_extended(to, from, flags);
else
break;
case IPC_INVALID:
default:
printk("Unsupported ipc operation.\n");
ret = -ENOSYS;
}
} else {
switch (ipc_type) {
case IPC_SEND:
ret = ipc_send(to, flags);
break;
case IPC_RECV:
ret = ipc_recv(from, flags);
break;
case IPC_SENDRECV:
ret = ipc_sendrecv(to, from, flags);
break;
case IPC_INVALID:
default:
printk("Unsupported ipc operation.\n");
ret = -ENOSYS;
break;
case IPC_INVALID:
default:
printk("Unsupported ipc operation.\n");
ret = -ENOSYS;
}
}
return ret;
}