sead::DelegateThread class

Base classes

class Thread

Public types

enum class HeapNullOption { AlwaysUseSpecifiedHeap = 0, UseSpecifiedOrContainHeap = 1, DoNotAppendDisposerIfNoHeapSpecified = 2, UseSpecifiedOrCurrentHeap = 3 }
enum class NodeClassType { Reflexible = 0, Node = 1, Other = 2 }
enum class AllocFlg { Name = 1u << 0u, Meta = 1u << 1u }

Public static variables

static const s32 cDefaultPriority

Public static functions

static void yield()
static void sleep(TickSpan howLong)
static auto getListNodeOffset() -> u32

Constructors, destructors, conversion operators

DelegateThread(const SafeString& name, IDelegate2<Thread*, MessageQueue::Element>* delegate, Heap* heap, s32 priority, MessageQueue::BlockType block_type, MessageQueue::Element quit_msg, s32 stack_size, s32 message_queue_size)
~DelegateThread() override

Public functions

void destroy() virtual
auto sendMessage(MessageQueue::Element msg, MessageQueue::BlockType block_type) -> bool virtual
auto recvMessage(MessageQueue::BlockType block_type) -> MessageQueue::Element virtual
auto getMessageQueue() const -> const MessageQueue& virtual
auto start() -> bool virtual
void quit(bool is_jam) virtual
void waitDone() virtual
void quitAndDestroySingleThread(bool is_jam) virtual
void quitAndWaitDoneSingleThread(bool is_jam) virtual
void setPriority(s32 prio) virtual
auto getPriority() const -> s32 virtual
auto getBlockType() const -> MessageQueue::BlockType virtual
auto getStackSize() const -> s32 virtual
auto calcStackUsedSizePeak() const -> s32 virtual
auto getId() const -> u32
auto getState() const -> State
auto isDone() const -> bool
auto isActive() const -> bool
auto getAffinity() const -> const CoreIdMask&
void setAffinity(const CoreIdMask& affinity)
void checkStackOverFlow(const char* source_file, s32 source_line) const
void checkStackEndCorruption(const char* source_file, s32 source_line) const
void checkStackPointerOverFlow(const char* source_file, s32 source_line) const
void setStackOverflowExceptionEnable(bool)
auto getThreadListNode() -> ThreadListNode*
auto isDefaultPriority() const -> bool
auto getCurrentHeap() const -> Heap*
auto setCurrentHeap(Heap* heap) -> Heap*
auto getFindContainHeapCache() -> FindContainHeapCache*
auto getName() const -> const SafeString&
void setName(const SafeString& name)
auto getNodeClassType() const -> NodeClassType virtual

Protected functions

void calc_(MessageQueue::Element msg) override
void run_() virtual
auto getStackCheckStartAddress_() const -> uintptr_t virtual
void initStackCheck_()
void initStackCheckWithCurrentStackPointer_()
auto getDisposerHeap_() const -> Heap*

Protected variables

IDelegate2<Thread*, MessageQueue::Element>* mDelegate
MessageQueue mMessageQueue
s32 mStackSize
ThreadListNode mListNode
Heap* mCurrentHeap
FindContainHeapCache mFindContainHeapCache
MessageQueue::BlockType mBlockType
MessageQueue::Element mQuitMsg
u32 mId
State mState
CoreIdMask mAffinity
void* mStackTop
void* mStackTopForCheck
s32 mPriority

Enum documentation

enum class sead::DelegateThread::HeapNullOption

enum class sead::DelegateThread::NodeClassType

Enumerators
Reflexible

sead::hostio::Reflexible

Node

sead::hostio::Node

Other

Other classes.

enum class sead::DelegateThread::AllocFlg

Function documentation

static void sead::DelegateThread::yield()

static void sead::DelegateThread::sleep(TickSpan howLong)

static u32 sead::DelegateThread::getListNodeOffset()

void sead::DelegateThread::destroy() virtual

bool sead::DelegateThread::sendMessage(MessageQueue::Element msg, MessageQueue::BlockType block_type) virtual

MessageQueue::Element sead::DelegateThread::recvMessage(MessageQueue::BlockType block_type) virtual

const MessageQueue& sead::DelegateThread::getMessageQueue() const virtual

bool sead::DelegateThread::start() virtual

void sead::DelegateThread::quit(bool is_jam) virtual

void sead::DelegateThread::waitDone() virtual

void sead::DelegateThread::quitAndDestroySingleThread(bool is_jam) virtual

void sead::DelegateThread::quitAndWaitDoneSingleThread(bool is_jam) virtual

void sead::DelegateThread::setPriority(s32 prio) virtual

s32 sead::DelegateThread::getPriority() const virtual

MessageQueue::BlockType sead::DelegateThread::getBlockType() const virtual

s32 sead::DelegateThread::getStackSize() const virtual

s32 sead::DelegateThread::calcStackUsedSizePeak() const virtual

u32 sead::DelegateThread::getId() const

State sead::DelegateThread::getState() const

bool sead::DelegateThread::isDone() const

bool sead::DelegateThread::isActive() const

const CoreIdMask& sead::DelegateThread::getAffinity() const

void sead::DelegateThread::setAffinity(const CoreIdMask& affinity)

void sead::DelegateThread::checkStackOverFlow(const char* source_file, s32 source_line) const

void sead::DelegateThread::checkStackEndCorruption(const char* source_file, s32 source_line) const

void sead::DelegateThread::checkStackPointerOverFlow(const char* source_file, s32 source_line) const

void sead::DelegateThread::setStackOverflowExceptionEnable(bool)

ThreadListNode* sead::DelegateThread::getThreadListNode()

bool sead::DelegateThread::isDefaultPriority() const

Heap* sead::DelegateThread::getCurrentHeap() const

Heap* sead::DelegateThread::setCurrentHeap(Heap* heap)

const SafeString& sead::DelegateThread::getName() const

void sead::DelegateThread::setName(const SafeString& name)

NodeClassType sead::DelegateThread::getNodeClassType() const virtual

void sead::DelegateThread::run_() virtual protected

uintptr_t sead::DelegateThread::getStackCheckStartAddress_() const virtual protected

void sead::DelegateThread::initStackCheck_() protected

void sead::DelegateThread::initStackCheckWithCurrentStackPointer_() protected

Heap* sead::DelegateThread::getDisposerHeap_() const protected

Variable documentation

static const s32 sead::DelegateThread::cDefaultPriority

MessageQueue sead::DelegateThread::mMessageQueue protected

s32 sead::DelegateThread::mStackSize protected

ThreadListNode sead::DelegateThread::mListNode protected

Heap* sead::DelegateThread::mCurrentHeap protected

FindContainHeapCache sead::DelegateThread::mFindContainHeapCache protected

MessageQueue::BlockType sead::DelegateThread::mBlockType protected

MessageQueue::Element sead::DelegateThread::mQuitMsg protected

u32 sead::DelegateThread::mId protected

State sead::DelegateThread::mState protected

CoreIdMask sead::DelegateThread::mAffinity protected

void* sead::DelegateThread::mStackTop protected

void* sead::DelegateThread::mStackTopForCheck protected

s32 sead::DelegateThread::mPriority protected