EkLocking.h - macros for lock handling.
This file defines two macros:
EK_DEFAULT_MUTEX - a default mutex class
EK_GUARD(type, lock) - declare a guard (see EkGuard.h) using a
particular lock of the given type
Configuration:
The macro EK_SINGLETHREADED will determine whether the EK being built or used is single-threaded or multi-threaded. If EK_SINGLETHREADED is defined, then EK is single-threaded. If it is not defined, EK is multi-threaded.
If EK_SINGLETHREADED is not defined, the EK_DEFAULT_MUTEX class is set to "EkMutex" otherwise it is set to the dummy "EkNullMutex" class.
If EK_SINGLETHREADED is defined and TGT_DEBUG is not defined, the EK_GUARD macro does not define a guard at all.
If EK_SINGLETHREADED is defined and TGT_DEBUG is defined, the EK_GUARD macro defines a guard that uses the EkNullMutex. |