CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
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)
 
#define TD_AUTOLOCK_P_DEF(Mutex)
 

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)
Value:

Definition at line 307 of file ThreadsCounter.h.

◆ TD_AUTOLOCK_P_DEF

#define TD_AUTOLOCK_P_DEF ( Mutex)
Value:
OdMutexPtrAutoLock autoLock(odThreadsCounter() ? Mutex.get() : NULL);
FIRSTDLL_EXPORT ThreadsCounter & odThreadsCounter()

Definition at line 308 of file ThreadsCounter.h.

Typedef Documentation

◆ ExecuteMainThreadFunc

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

Definition at line 172 of file ThreadsCounter.h.

◆ MainThreadFunc

typedef void(* MainThreadFunc) (void *)

Definition at line 170 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 ( )