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

@@ -145,15 +145,29 @@ static inline unsigned int tcb_get_ipc_flags(struct ktcb *task)
return task->ipc_flags;
}
static inline unsigned int
ipc_flags_set_type(unsigned int flags, unsigned int type)
{
flags &= ~IPC_FLAGS_TYPE_MASK;
flags |= type & IPC_FLAGS_TYPE_MASK;
return flags;
}
static inline unsigned int ipc_flags_get_type(unsigned int flags)
{
return flags & IPC_FLAGS_TYPE_MASK;
}
static inline void tcb_set_ipc_type(struct ktcb *task,
unsigned int type)
{
task->ipc_flags = type & IPC_FLAGS_TYPE_MASK;
task->ipc_flags = ipc_flags_set_type(task->ipc_flags,
type);
}
static inline unsigned int tcb_get_ipc_type(struct ktcb *task)
{
return task->ipc_flags & IPC_FLAGS_TYPE_MASK;
return ipc_flags_get_type(task->ipc_flags);
}
#define THREAD_IDS_MAX 1024