CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
ThreadsCounter.h File Reference
#include "TD_PackPush.h"
#include "OdMutex.h"
#include "TD_PackPop.h"

Go to the source code of this file.

Classes

class  OdMutexPtr
 
class  OdMutexPtrAutoLock
 
class  ThreadsCounterReactor
 
class  ThreadsCounter
 

Macros

#define TD_AUTOLOCK_P(Mutex)   OdMutexPtrAutoLock autoLock(Mutex);
 
#define TD_AUTOLOCK_P_DEF(Mutex)   OdMutexPtrAutoLock autoLock(odThreadsCounter() ? Mutex.get() : NULL);
 

Typedefs

typedef void(* MainThreadFunc) (void *)
 
typedef void(* ExecuteMainThreadFunc) (MainThreadFunc, void *)
 

Functions

FIRSTDLL_EXPORT ThreadsCounterodThreadsCounter ()
 
FIRSTDLL_EXPORT bool odExecuteMainThreadAction (MainThreadFunc mtFunc, void *pArg, bool bExecST=true)
 
FIRSTDLL_EXPORT unsigned odGetCurrentThreadId ()
 
FIRSTDLL_EXPORT void odThreadYield ()
 

Macro Definition Documentation

◆ TD_AUTOLOCK_P

#define TD_AUTOLOCK_P (   Mutex)    OdMutexPtrAutoLock autoLock(Mutex);

Definition at line 297 of file ThreadsCounter.h.

◆ TD_AUTOLOCK_P_DEF

#define TD_AUTOLOCK_P_DEF (   Mutex)    OdMutexPtrAutoLock autoLock(odThreadsCounter() ? Mutex.get() : NULL);

Definition at line 298 of file ThreadsCounter.h.

Typedef Documentation

◆ ExecuteMainThreadFunc

typedef void(* ExecuteMainThreadFunc) (MainThreadFunc, void *)

Definition at line 162 of file ThreadsCounter.h.

◆ MainThreadFunc

typedef void(* MainThreadFunc) (void *)

Definition at line 160 of file ThreadsCounter.h.

Function Documentation

◆ odExecuteMainThreadAction()

FIRSTDLL_EXPORT bool odExecuteMainThreadAction ( MainThreadFunc  mtFunc,
void pArg,
bool  bExecST = true 
)

◆ odGetCurrentThreadId()

FIRSTDLL_EXPORT unsigned odGetCurrentThreadId ( )

◆ odThreadsCounter()

FIRSTDLL_EXPORT ThreadsCounter & odThreadsCounter ( )

◆ odThreadYield()

FIRSTDLL_EXPORT void odThreadYield ( )