23 std::atomic<Size>& reentrantCnt;
28 std::atomic<Size>& totalCnt,
35 #define CHECK_FUNCTION(flags) \
36 static std::atomic<Size> __reentrantCnt; \
37 static std::atomic<Size> __totalCnt; \
38 FunctionChecker __checker(__reentrantCnt, __totalCnt, flags);
40 #define CHECK_FUNCTION(flags)
@ NOT_MAIN_THREAD
Function cannot be called from main thread.
@ NO_THROW
Function cannot throw exceptions.
@ MAIN_THREAD
Function can only be executed from main thread.
@ ONCE
Function can be executed only once in the application.
@ NON_REENRANT
Function can be executed by any thread, but only once at a time.
bool isMainThread()
Checks if the calling thread is the main thred.
Wrapper over enum allowing setting (and querying) individual bits of the stored value.
Global parameters of the code.
#define NAMESPACE_SPH_END
FunctionChecker(std::atomic< Size > &reentrantCnt, std::atomic< Size > &totalCnt, const Flags< CheckFunction > flags)