NeKernel dev
Loading...
Searching...
No Matches
Kernel::HardwareThread Class Referencefinal

#include <HardwareThreadScheduler.h>

Public Member Functions

 HardwareThread ()
 !
 ~HardwareThread ()
 !
 operator bool ()
void Wake (const BOOL wakeup=false) noexcept
 Wakeup the processor.
void Busy (const BOOL busy=false) noexcept
BOOL Switch (HAL::StackFramePtr frame)
 Switch to hardware thread.
BOOL IsWakeup () noexcept
 !
HAL::StackFramePtr StackFrame () noexcept
 Get processor stack frame.
ThreadKindKind () noexcept
 returns the kind of thread we have.
BOOL IsBusy () noexcept
 is the thread busy?
ThreadIDID () noexcept
 returns the id of the thread.

Private Attributes

HAL::StackFramePtr fStack {nullptr}
ThreadKind fKind {ThreadKind::kAPStandard}
ThreadID fID {0}
Bool fWakeup {NO}
Bool fBusy {NO}
UInt64 fPTime {0}

Friends

class HardwareThreadScheduler
class UserProcessHelper

Constructor & Destructor Documentation

◆ HardwareThread()

Kernel::HardwareThread::HardwareThread ( )
explicitdefault

!

! A HardwareThread class takes care of it's owned hardware thread. It has a stack for it's core. C++ constructor.

◆ ~HardwareThread()

Kernel::HardwareThread::~HardwareThread ( )
default

!

C++ destructor.

Member Function Documentation

◆ Busy()

Void Kernel::HardwareThread::Busy ( const BOOL busy = false)
noexcept

◆ ID()

ThreadID & Kernel::HardwareThread::ID ( )
noexcept

returns the id of the thread.

◆ IsBusy()

Bool Kernel::HardwareThread::IsBusy ( )
noexcept

is the thread busy?

Returns
whether the thread is busy or not.

◆ IsWakeup()

bool Kernel::HardwareThread::IsWakeup ( )
noexcept

!

Tells if processor is waked up.

◆ Kind()

ThreadKind & Kernel::HardwareThread::Kind ( )
noexcept

returns the kind of thread we have.

◆ operator bool()

Kernel::HardwareThread::operator bool ( )

◆ StackFrame()

HAL::StackFramePtr Kernel::HardwareThread::StackFrame ( )
noexcept

Get processor stack frame.

◆ Switch()

Bool Kernel::HardwareThread::Switch ( HAL::StackFramePtr frame)

Switch to hardware thread.

Parameters
stackthe new hardware thread.
Return values
truestack was changed, code is running.
falsestack is invalid, previous code is running.

◆ Wake()

Void Kernel::HardwareThread::Wake ( const BOOL wakeup = false)
noexcept

Wakeup the processor.

◆ HardwareThreadScheduler

friend class HardwareThreadScheduler
friend

◆ UserProcessHelper

friend class UserProcessHelper
friend

Member Data Documentation

◆ fBusy

Bool Kernel::HardwareThread::fBusy {NO}
private

◆ fID

ThreadID Kernel::HardwareThread::fID {0}
private

◆ fKind

ThreadKind Kernel::HardwareThread::fKind {ThreadKind::kAPStandard}
private

◆ fPTime

UInt64 Kernel::HardwareThread::fPTime {0}
private

◆ fStack

HAL::StackFramePtr Kernel::HardwareThread::fStack {nullptr}
private

◆ fWakeup

Bool Kernel::HardwareThread::fWakeup {NO}
private

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