The Pedigree Project
0.1
|
Classes | |
struct | RobustListData |
Public Types | |
enum | Membership { Leader = 0, Member, NoGroup } |
Public Types inherited from Process | |
enum | ProcessType { Stock, Posix } |
enum | ProcessState { Active, Suspended, Terminating, Terminated, Reaped } |
Public Member Functions | |
PosixProcess (Process *pParent, bool bCopyOnWrite=true) | |
void | setProcessGroup (ProcessGroup *newGroup, bool bRemoveFromGroup=true) |
ProcessGroup * | getProcessGroup () const |
void | setGroupMembership (Membership type) |
Membership | getGroupMembership () const |
PosixSession * | getSession () const |
void | setSession (PosixSession *p) |
virtual ProcessType | getType () |
void | setMask (uint32_t mask) |
uint32_t | getMask () const |
const RobustListData & | getRobustList () const |
void | setRobustList (const RobustListData &data) |
IntervalTimer & | getRealIntervalTimer () |
IntervalTimer & | getVirtualIntervalTimer () |
IntervalTimer & | getProfileIntervalTimer () |
virtual int64_t | getUserId () const |
virtual int64_t | getGroupId () const |
virtual int64_t | getEffectiveUserId () const |
virtual int64_t | getEffectiveGroupId () const |
virtual void | getSupplementalGroupIds (Vector< int64_t > &vec) const |
void | setUserId (int64_t id) |
void | setGroupId (int64_t id) |
void | setEffectiveUserId (int64_t id) |
void | setEffectiveGroupId (int64_t id) |
void | setSupplementalGroupIds (const Vector< int64_t > &vec) |
int64_t | getSavedUserId () const |
int64_t | getSavedGroupId () const |
void | setSavedUserId (int64_t id) |
void | setSavedGroupId (int64_t id) |
Public Member Functions inherited from Process | |
Process () | |
Process (Process *pParent, bool bCopyOnWrite=true) | |
virtual | ~Process () |
size_t | addThread (Thread *pThread) |
void | removeThread (Thread *pThread) |
size_t | getNumThreads () |
Thread * | getThread (size_t n) |
size_t | getId () |
LargeStaticString & | description () |
VirtualAddressSpace * | getAddressSpace () |
void | setExitStatus (int code) |
int | getExitStatus () |
void | reap () |
void | kill () NORETURN |
void | suspend () |
void | resume () |
Process * | getParent () |
File * | getCwd () |
void | setCwd (File *f) |
File * | getCtty () |
void | setCtty (File *f) |
MemoryAllocator & | getSpaceAllocator () |
MemoryAllocator & | getDynamicSpaceAllocator () |
User * | getUser () const |
void | setUser (User *pUser) |
User * | getEffectiveUser () const |
void | setEffectiveUser (User *pUser) |
Group * | getGroup () const |
void | setGroup (Group *pGroup) |
Group * | getEffectiveGroup () const |
void | setEffectiveGroup (Group *pGroup) |
void | setLinker (DynamicLinker *pDl) |
DynamicLinker * | getLinker () |
void | setSubsystem (Subsystem *pSubsystem) |
Subsystem * | getSubsystem () |
void | addWaiter (Semaphore *pWaiter) |
void | removeWaiter (Semaphore *pWaiter) |
size_t | waiterCount () const |
bool | hasSuspended () |
bool | hasResumed () |
ProcessState | getState () const |
void | markTerminating () |
void | trackHeap (ssize_t nBytes) |
void | trackPages (ssize_t nVirtual, ssize_t nPhysical, ssize_t nShared) |
void | resetCounts () |
void | recordTime (bool bUserspace) |
void | trackTime (bool bUserspace) |
Time::Timestamp | getUserTime () const |
Time::Timestamp | getKernelTime () const |
Time::Timestamp | getStartTime () const |
ssize_t | getHeapUsage () const |
ssize_t | getVirtualPageCount () const |
ssize_t | getPhysicalPageCount () const |
ssize_t | getSharedPageCount () const |
void | setRootFile (File *pFile) |
File * | getRootFile () const |
bool | hasSharedAddressSpace () const |
Private Member Functions | |
void | registerProcess () |
void | unregisterProcess () |
virtual void | reportTimesUpdated (Time::Timestamp user, Time::Timestamp system) |
virtual void | processTerminated () |
PosixProcess (const PosixProcess &) | |
PosixProcess & | operator= (const PosixProcess &) |
Private Attributes | |
PosixSession * | m_pSession |
ProcessGroup * | m_pProcessGroup |
Membership | m_GroupMembership |
uint32_t | m_Mask |
RobustListData | m_RobustListData |
IntervalTimer | m_RealIntervalTimer |
IntervalTimer | m_VirtualIntervalTimer |
IntervalTimer | m_ProfileIntervalTimer |
int64_t | m_Uid |
int64_t | m_Gid |
int64_t | m_Euid |
int64_t | m_Egid |
int64_t | m_Suid |
int64_t | m_Sgid |
Vector< int64_t > | m_SupplementalIds |
Additional Inherited Members | |
Static Public Member Functions inherited from Process | |
static Process * | getInit () |
static void | setInit (Process *pProcess) |
Public Attributes inherited from Process | |
Semaphore | m_DeadThreads |
Definition at line 128 of file PosixProcess.h.
PosixProcess::PosixProcess | ( | Process * | pParent, |
bool | bCopyOnWrite = true |
||
) |
Copy constructor.
Definition at line 58 of file PosixProcess.cc.
References List< T, nodePoolSize >::begin(), Vector< T >::clear(), List< T, nodePoolSize >::end(), List< T, nodePoolSize >::erase(), Process::getType(), Process::getUserId(), Member, ProcessGroup::Members, ProcessGroup::processGroupId, List< T, nodePoolSize >::pushBack(), and ProcessGroupManager::setGroupId().
|
virtual |
Gets the type of the Process (subsystems may override)
Reimplemented from Process.
Definition at line 153 of file PosixProcess.cc.
References ProcFs::addProcess(), VFS::instance(), VFS::lookupFilesystem(), and ProcFs::removeProcess().
|
virtual |
Direct, overrideable ways to get IDs (redirects to User/Group interface by default)
Reimplemented from Process.
Definition at line 415 of file PosixProcess.cc.
References Vector< T >::pushBack(), and Vector< T >::size().
|
privatevirtual |
Called when the process is terminated to allow for subclass cleanup.
Reimplemented from Process.
Definition at line 224 of file PosixProcess.cc.
References IntervalTimer::setIntervalAndValue().
|
privatevirtual |
Called when process times are updated.
Reimplemented from Process.
Definition at line 217 of file PosixProcess.cc.
References IntervalTimer::adjustValue().