SSCMA-Micro CPP SDK  v2.0.0
SSCMA-Micro is a cross-platform machine learning inference framework designed for embedded devices.
ma::Thread Class Reference

#include <ma_osal.h>

Collaboration diagram for ma::Thread:

Public Member Functions

 Thread (const char *name, void(*entry)(void *), void *arg=nullptr, uint32_t priority=0, size_t stacksize=0, ma_stack_t *stack=nullptr) noexcept
 
virtual ~Thread () noexcept
 
 operator bool () const
 
bool start (void *arg=nullptr)
 
bool stop ()
 
bool join ()
 
bool operator== (const Thread &other) const
 

Static Public Member Functions

static void sleep (ma_tick_t tick)
 
static void yield ()
 
static ma_thread_tself ()
 
static void enterCritical ()
 
static void exitCritical ()
 

Protected Member Functions

virtual void threadEntryPoint (void)
 

Constructor & Destructor Documentation

◆ Thread()

ma::Thread::Thread ( const char *  name,
void(*)(void *)  entry,
void *  arg = nullptr,
uint32_t  priority = 0,
size_t  stacksize = 0,
ma_stack_t stack = nullptr 
)
noexcept

◆ ~Thread()

virtual ma::Thread::~Thread ( )
virtualnoexcept

Member Function Documentation

◆ enterCritical()

static void ma::Thread::enterCritical ( )
static

◆ exitCritical()

static void ma::Thread::exitCritical ( )
static

◆ join()

bool ma::Thread::join ( )

◆ operator bool()

ma::Thread::operator bool ( ) const

◆ operator==()

bool ma::Thread::operator== ( const Thread other) const

◆ self()

static ma_thread_t* ma::Thread::self ( )
static

◆ sleep()

static void ma::Thread::sleep ( ma_tick_t  tick)
static
Here is the caller graph for this function:

◆ start()

bool ma::Thread::start ( void *  arg = nullptr)
Here is the caller graph for this function:

◆ stop()

bool ma::Thread::stop ( )
Here is the caller graph for this function:

◆ threadEntryPoint()

virtual void ma::Thread::threadEntryPoint ( void  )
protectedvirtual

◆ yield()

static void ma::Thread::yield ( )
static
Here is the caller graph for this function: