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