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
 
ThreadLease & operator= (ThreadLease &&other) noexcept
 
Thread * get () const
 
Thread * operator-> () const
 
 operator bool () const
 
void reset ()
 

Private Member Functions

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

Private Attributes

Process * m_pProcess
 
Thread * m_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 189 of file Process.h.

Constructor & Destructor Documentation

◆ ThreadLease() [1/3]

Process::ThreadLease::ThreadLease ( )

Definition at line 353 of file Process.cc.

◆ ThreadLease() [2/3]

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

Definition at line 439 of file Process.cc.

◆ ~ThreadLease()

Process::ThreadLease::~ThreadLease ( )

Definition at line 447 of file Process.cc.

◆ ThreadLease() [3/3]

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

Definition at line 436 of file Process.cc.

Member Function Documentation

◆ get()

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

Definition at line 197 of file Process.h.

◆ operator bool()

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

Definition at line 205 of file Process.h.

◆ operator->()

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

Definition at line 201 of file Process.h.

◆ operator=()

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

Definition at line 451 of file Process.cc.

◆ reset()

void Process::ThreadLease::reset ( )

Definition at line 472 of file Process.cc.

Friends And Related Symbol Documentation

◆ Process

friend class Process
friend

Definition at line 212 of file Process.h.

Member Data Documentation

◆ m_pProcess

Process* Process::ThreadLease::m_pProcess
private

Definition at line 218 of file Process.h.

◆ m_pThread

Thread* Process::ThreadLease::m_pThread
private

Definition at line 219 of file Process.h.

◆ m_TerminationDeferral

TerminationDeferral Process::ThreadLease::m_TerminationDeferral
private

Definition at line 220 of file Process.h.


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