mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 10:53:16 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user