Go to the documentation of this file.
18 #ifndef __KERNEL_PROCESS_H
19 #define __KERNEL_PROCESS_H
Responsible for deciding which Process may execute on the local Core.
ProcessID m_waitId
Waits for exit of this Process.
MemoryContext * m_memoryContext
MMU memory context.
virtual void reset(const Address entry)=0
Restart execution at the given entry point.
Represents a process which may run on the host.
Virtual memory abstract interface.
State getState() const
Retrieves the current state.
Represents a process which may run on the host.
Result raiseEvent(const struct ProcessEvent *event)
Raise kernel event.
ProcessID getID() const
Retrieve our ID number.
virtual ~Process()
Destructor function.
bool isPrivileged() const
Get privilege.
MemoryMap m_map
Virtual memory layout.
ProcessID getParent() const
Retrieve our parent ID.
u32 ProcessID
Process Identification Number.
uint m_waitResult
Wait exit result of the other Process.
unsigned long Address
A memory address.
Timer::Info m_sleepTimer
Sleep timer value.
Process(ProcessID id, Address entry, bool privileged, const MemoryMap &map)
Constructor function.
Timer information structure.
Result wakeup()
Prevent process from sleeping.
unsigned int uint
Unsigned integer number.
State m_state
Current process status.
ProcessShares & getShares()
Get process shares.
Result stop()
Stop execution of this process.
MemoryContext * getMemoryContext()
Get MMU memory context.
Result resume()
Resume execution when this process is stopped.
Represents a process which may run on the host.
virtual void execute(Process *previous)=0
Allow the Process to run on the CPU.
Size m_wakeups
Number of wakeups received.
ProcessShares m_shares
Contains virtual memory shares between this process and others.
Describes virtual memory map layout.
unsigned int Size
Any sane size indicator cannot go negative.
Address m_entry
Entry point of the program.
Unidirectional point-to-point channel using shared memory.
const ProcessID m_id
Process Identifier.
void setParent(ProcessID id)
Set parent process ID.
virtual Result join(const uint result)
Complete waiting for another Process.
virtual Result initialize()
Initialize the Process.
State
Represents the execution state of the Process.
Result sleep(const Timer::Info *timer, bool ignoreWakeups)
Stops the process for executing until woken up.
uint getWaitResult() const
Get wait result.
bool operator==(Process *proc)
Compare two processes.
const Timer::Info & getSleepTimer() const
Get sleep timer.
MemoryChannel * m_kernelChannel
Channel for sending kernel events to the Process.
Result wait(ProcessID id)
Let Process wait for other Process to terminate.
ProcessID getWait() const
Get Wait ID.
bool m_privileged
Privilege level.
Manages memory shares for a Process.
ProcessID m_parent
Parent process.