OROCHI
 
Loading...
Searching...
No Matches
GxWorkerThread Class Reference

ワーカースレッドクラス More...

#include <GxThread.h>

Inheritance diagram for GxWorkerThread:
Collaboration diagram for GxWorkerThread:

初期化

 GxWorkerThread (void)
 コンストラクタ
 
void initializeThreadLocalStorage (void)
 TLSの初期化
 
static void initializeMainThread (void)
 メインスレッドの初期化
 
static void terminateMainThread (void)
 メインスレッドの終了
 

アクセサ

constexpr GxWorkerThreadManagergetOwner (void) const
 管理者を取得
 
constexpr void setOwner (GxWorkerThreadManager *pOwner)
 管理者を設定
 
constexpr u32 getWorkerIndex (void) const
 ワーカースレッド用インデックスを取得
 
constexpr void setWorkerIndex (u32 index)
 ワーカースレッド用インデックスを設定
 
static u32 getCurrentWorkerIndex (void)
 カレントのワーカースレッド用インデックスを取得
 

操作

GX_FORCE_INLINE b32 waitStartEvent (s32 milliSecond=-1)
 開始イベント待ち
 
GX_FORCE_INLINE b32 setStartEvent (void)
 開始イベント開始
 
GX_FORCE_INLINE b32 waitCompleteEvent (s32 milliSecond=-1)
 完了イベント待ち
 
GX_FORCE_INLINE b32 setCompleteEvent (void)
 完了イベント開始
 
GX_FORCE_INLINE void setRequestStop (void)
 停止リクエスト設定
 
GX_FORCE_INLINE b32 isRequestStop (void) const
 停止リクエストチェック
 
void createCallback (void) override
 作成時のコールバック関数
 
void threadMain (void *pArgument) override
 メインループ
 

Additional Inherited Members

- Public Types inherited from GxThread
enum class  PRIORITY {
  LOW = -2 , BELOW , NORMAL , ABOVE ,
  HIGH , MAX = 5
}
 優先度 More...
 
- Public Member Functions inherited from GxThread
 GxThread (void)
 コンストラクタ
 
 ~GxThread (void) override
 デストラクタ
 
b32 isStop (void) const
 停止中か判定
 
constexpr u32 getIndex (void) const
 インデックスを取得
 
constexpr GxRandomgetRandomGenerator (void) const
 乱数発生器を取得
 
b32 create (void *pIn, PRIORITY priority, u32 stackSize, s32 cpuIndex=-1)
 作成
 
void suspend (void)
 サスペンド
 
void resume (void)
 サスペンドから復帰
 
- Public Member Functions inherited from GxClassBase
constexpr GxClassBase (void)
 コンストラクタ
 
constexpr GxClassBase (const GxClassBase &base)
 コピーコンストラクタ
 
 ~GxClassBase (void) override
 デストラクタ
 
- Public Member Functions inherited from GxClassBaseRoot
constexpr GxClassBaseRoot (void)
 コンストラクタ
 
constexpr GxClassBaseRoot (const GxClassBaseRoot &)
 コピーコンストラクタ
 
virtual ~GxClassBaseRoot (void)
 デストラクタ
 
constexpr GxClassBaseRootoperator= (const GxClassBaseRoot &)
 代入演算子
 
virtual GxRttigetRtti (void) const =0
 Rttiの取得
 
virtual GX_FORCE_INLINE const GxTypedObjectgetDefaultObject (void)
 デフォルトオブジェクトを取得
 
GX_FORCE_INLINE b32 isDefaultObject (void)
 デフォルトオブジェクト判定
 
- Static Public Member Functions inherited from GxThread
static GxThreadgetCurrentThread (void)
 カレントスレッドを取得
 
static GX_FORCE_INLINE void setFixThread (b32 on)
 スレッドのCPUを固定するか設定
 
static GX_FORCE_INLINE b32 isFixThread (void)
 スレッドのCPUを固定するか判定
 
static b32 casU32 (volatile u32 *pTarget, u32 oldValue, u32 newValue)
 符号なし32bit整数CAS(Compare-And-Swap)
 
static b32 casPointer (volatile void **ppTarget, void *pOld, void *pNew)
 ポインタCAS(Compare-And-Swap)
 
static void barrierMemory (void)
 メモリバリア
 
static void atomicExchangeU32 (volatile u32 *pTarget, u32 newValue)
 アトミックU32
 
static void sleep (u32 milliSecond)
 スリープ
 
- Static Public Member Functions inherited from GxClassBaseRoot
static GX_FORCE_INLINE GxRtti__getStaticRtti (void)
 Rttiの取得
 
- Static Public Attributes inherited from GxThread
static constexpr u32 THREAD_MAX = GxMath::VALUE_32
 スレッドの最大数
 
static constexpr u32 INVALID_INDEX = 0xFFFFFFFF
 無効スレッドインデックス
 
static constexpr u32 MAIN_THREAD_INDEX = 0
 メインスレッドインデックス
 
- Protected Member Functions inherited from GxThread
void stop (void)
 停止(スレッド外からの呼び出し禁止)
 
- Protected Attributes inherited from GxThread
GxNativeThread _threadId
 スレッドID
 
- Static Protected Attributes inherited from GxThread
static GxThread_pThread [THREAD_MAX] = {nullptr}
 スレッド自身のポインタ
 
static u32 _num = 0
 作ったスレッド数
 

Detailed Description

ワーカースレッドクラス

Member Function Documentation

◆ createCallback()

void GxWorkerThread::createCallback ( void )
overrideprotectedvirtual

作成時のコールバック関数

Reimplemented from GxThread.

Here is the call graph for this function:

◆ getCurrentWorkerIndex()

u32 GxWorkerThread::getCurrentWorkerIndex ( void )
static

カレントのワーカースレッド用インデックスを取得

Returns
ワーカースレッドインデックス
Here is the call graph for this function:
Here is the caller graph for this function:

◆ threadMain()

void GxWorkerThread::threadMain ( void * pArgument)
overrideprotectedvirtual

メインループ

Parameters
pArgument[in] 引数

Implements GxThread.

Here is the call graph for this function:

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