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

#include <Process.h>

+ Collaboration diagram for Process::ThreadLease:

Public Member Functions

 ThreadLease (ThreadLease &&other) noexcept
 
ThreadLeaseoperator= (ThreadLease &&other) noexcept
 
Threadget () const
 
Threadoperator-> () const
 
 operator bool () const
 
void reset ()
 

Private Member Functions

 ThreadLease (Process *process, Thread *thread)
 
 ThreadLease (const ThreadLease &)=delete
 
ThreadLeaseoperator= (const ThreadLease &)=delete
 

Private Attributes

Processm_pProcess
 
Threadm_pThread
 
TerminationDeferral m_TerminationDeferral
 

Friends

class Process
 

Detailed Description

Pins one Thread together with its owning Process.

Detached-thread deletion closes admission and drains these leases after the scheduler has switched off the target stack. Process destruction likewise drains the Process half before deleting retained Threads. Leases are thread-affine and must be released by their acquiring Thread.

Definition at line 153 of file Process.h.

Constructor & Destructor Documentation

◆ ThreadLease() [1/3]

Process::ThreadLease::ThreadLease ( )

Definition at line 248 of file Process.cc.

◆ ThreadLease() [2/3]

Process::ThreadLease::ThreadLease ( ThreadLease &&  other)
noexcept

Definition at line 334 of file Process.cc.

◆ ~ThreadLease()

Process::ThreadLease::~ThreadLease ( )

Definition at line 342 of file Process.cc.

◆ ThreadLease() [3/3]

Process::ThreadLease::ThreadLease ( Process process,
Thread thread 
)
private

Definition at line 331 of file Process.cc.

Member Function Documentation

◆ get()

Thread * Process::ThreadLease::get ( ) const
inline

Definition at line 161 of file Process.h.

◆ operator bool()

Process::ThreadLease::operator bool ( ) const
inlineexplicit

Definition at line 169 of file Process.h.

◆ operator->()

Thread * Process::ThreadLease::operator-> ( ) const
inline

Definition at line 165 of file Process.h.

◆ operator=()

Process::ThreadLease & Process::ThreadLease::operator= ( ThreadLease &&  other)
noexcept

Definition at line 346 of file Process.cc.

◆ reset()

void Process::ThreadLease::reset ( )

Definition at line 367 of file Process.cc.

Friends And Related Symbol Documentation

◆ Process

friend class Process
friend

Definition at line 176 of file Process.h.

Member Data Documentation

◆ m_pProcess

Process* Process::ThreadLease::m_pProcess
private

Definition at line 182 of file Process.h.

◆ m_pThread

Thread* Process::ThreadLease::m_pThread
private

Definition at line 183 of file Process.h.

◆ m_TerminationDeferral

TerminationDeferral Process::ThreadLease::m_TerminationDeferral
private

Definition at line 184 of file Process.h.


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