The Pedigree Project 0.1
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
Scheduler::ProcessLease Class Reference

#include <Scheduler.h>

+ Collaboration diagram for Scheduler::ProcessLease:

Public Member Functions

 ProcessLease (ProcessLease &&other) noexcept
 
ProcessLeaseoperator= (ProcessLease &&other) noexcept
 
Processget () const
 
Processoperator-> () const
 
 operator bool () const
 
void reset ()
 

Private Member Functions

 ProcessLease (Process *process)
 
 ProcessLease (const ProcessLease &)=delete
 
ProcessLeaseoperator= (const ProcessLease &)=delete
 

Private Attributes

Processm_pProcess
 
TerminationDeferral m_TerminationDeferral
 

Friends

class Scheduler
 

Detailed Description

Pins one enumerated Process until the lease leaves scope.

Process teardown first removes the object from scheduler enumeration, closes lease admission, and then waits for every admitted lease. This makes it safe to inspect a Process without retaining an unowned raw pointer after the scheduler lock is released. Leases are thread-affine: they may be returned/moved locally but must be released by the Thread which acquired them.

Definition at line 62 of file Scheduler.h.

Constructor & Destructor Documentation

◆ ProcessLease() [1/3]

Scheduler::ProcessLease::ProcessLease ( )

Definition at line 55 of file Scheduler.cc.

◆ ProcessLease() [2/3]

Scheduler::ProcessLease::ProcessLease ( ProcessLease &&  other)
noexcept

Definition at line 60 of file Scheduler.cc.

◆ ~ProcessLease()

Scheduler::ProcessLease::~ProcessLease ( )

Definition at line 66 of file Scheduler.cc.

◆ ProcessLease() [3/3]

Scheduler::ProcessLease::ProcessLease ( Process process)
explicitprivate

Definition at line 57 of file Scheduler.cc.

Member Function Documentation

◆ get()

Process * Scheduler::ProcessLease::get ( ) const
inline

Definition at line 70 of file Scheduler.h.

◆ operator bool()

Scheduler::ProcessLease::operator bool ( ) const
inlineexplicit

Definition at line 78 of file Scheduler.h.

◆ operator->()

Process * Scheduler::ProcessLease::operator-> ( ) const
inline

Definition at line 74 of file Scheduler.h.

◆ operator=()

Scheduler::ProcessLease & Scheduler::ProcessLease::operator= ( ProcessLease &&  other)
noexcept

Definition at line 70 of file Scheduler.cc.

◆ reset()

void Scheduler::ProcessLease::reset ( )

Definition at line 88 of file Scheduler.cc.

Friends And Related Symbol Documentation

◆ Scheduler

friend class Scheduler
friend

Definition at line 85 of file Scheduler.h.

Member Data Documentation

◆ m_pProcess

Process* Scheduler::ProcessLease::m_pProcess
private

Definition at line 91 of file Scheduler.h.

◆ m_TerminationDeferral

TerminationDeferral Scheduler::ProcessLease::m_TerminationDeferral
private

Definition at line 92 of file Scheduler.h.


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