The Pedigree Project  0.1
Public Member Functions | Private Attributes | List of all members
WaitCleanup Class Reference
+ Collaboration diagram for WaitCleanup:

Public Member Functions

 WaitCleanup (List< Process * > *cleanupList, Semaphore *lock)
 
void terminated (Process *pProcess)
 

Private Attributes

List< Process * > * m_List
 
Semaphorem_Lock
 
Processm_pTerminated
 

Detailed Description

Class intended to be used for RAII to clean up waitpid state on exit.

Definition at line 502 of file system-syscalls.cc.

Member Function Documentation

void WaitCleanup::terminated ( Process pProcess)
inline

Call this with the process that terminated most recently, which is necessary because otherwise upon exit from waitpid() we attempt to access the (deleted) Process object, which is not safe.

Definition at line 515 of file system-syscalls.cc.

References Semaphore::acquire(), List< T, nodePoolSize >::begin(), PosixSubsystem::checkAddress(), List< T, nodePoolSize >::clear(), List< T, nodePoolSize >::count(), Vector< T >::count(), Dec, List< T, nodePoolSize >::end(), ERROR, Thread::Exit, PosixSubsystem::exit(), EXPORTED_PUBLIC, FATAL, PosixSubsystem::getAbi(), User::getDefaultGroup(), Process::getExitStatus(), User::getFullName(), UserManager::getGroup(), User::getHome(), Group::getId(), User::getId(), Process::getId(), Group::getName(), Timer::getNanosecond(), Scheduler::getNumProcesses(), Process::getParent(), Scheduler::getProcess(), User::getShell(), Thread::getStatus(), Process::getThread(), Machine::getTimer(), Process::getType(), Timer::getUnixTimestamp(), UserManager::getUser(), Process::getUserId(), User::getUsername(), Process::getUserTime(), Hex, Processor::information(), UserManager::instance(), Scheduler::instance(), Subsystem::kill(), PosixSession::Leader, ProcessGroup::Leader, PosixProcess::Leader, User::login(), PosixProcess::Member, ProcessGroup::Members, PosixProcess::NoGroup, NOTICE, Oct, ProcessGroup::processGroupId, List< T, nodePoolSize >::pushBack(), Vector< T >::pushBack(), Process::reap(), Scheduler::removeProcess(), Process::setCtty(), Processor::setInterrupts(), IntervalTimer::setIntervalAndValue(), terminated(), WARNING, and Scheduler::yield().

Referenced by terminated().

+ Here is the caller graph for this function:


The documentation for this class was generated from the following file: