ZFFramework
 
Loading...
Searching...
No Matches
ZFObjectMutex.h
Go to the documentation of this file.
1
5
6#ifndef _ZFI_ZFObjectMutex_h_
7#define _ZFI_ZFObjectMutex_h_
8
10
12
14typedef void *(*ZFObjectMutexImplCallbackInit)(void);
16typedef void (*ZFObjectMutexImplCallbackDealloc)(ZF_IN void *implObject);
22typedef zfbool (*ZFObjectMutexImplCallbackTryLock)(ZF_IN void *implObject);
23
24extern ZFLIB_ZFCore ZFObjectMutexImplCallbackInit _ZFP_ZFObjectMutexImplInit;
25extern ZFLIB_ZFCore ZFObjectMutexImplCallbackDealloc _ZFP_ZFObjectMutexImplDealloc;
26extern ZFLIB_ZFCore ZFObjectMutexImplCallbackLock _ZFP_ZFObjectMutexImplLock;
27extern ZFLIB_ZFCore ZFObjectMutexImplCallbackUnlock _ZFP_ZFObjectMutexImplUnlock;
28extern ZFLIB_ZFCore ZFObjectMutexImplCallbackTryLock _ZFP_ZFObjectMutexImplTryLock;
29
30// ============================================================
51 );
52
54inline ZFObjectMutexImplCallbackInit ZFObjectMutexImplGetInit(void) {return _ZFP_ZFObjectMutexImplInit;}
56inline ZFObjectMutexImplCallbackDealloc ZFObjectMutexImplGetDealloc(void) {return _ZFP_ZFObjectMutexImplDealloc;}
58inline ZFObjectMutexImplCallbackLock ZFObjectMutexImplGetLock(void) {return _ZFP_ZFObjectMutexImplLock;}
60inline ZFObjectMutexImplCallbackUnlock ZFObjectMutexImplGetUnlock(void) {return _ZFP_ZFObjectMutexImplUnlock;}
62inline ZFObjectMutexImplCallbackTryLock ZFObjectMutexImplGetTryLock(void) {return _ZFP_ZFObjectMutexImplTryLock;}
63
65inline zfbool ZFObjectMutexImplAvailable(void) {return (_ZFP_ZFObjectMutexImplInit != zfnull);}
66
68#endif // #ifndef _ZFI_ZFObjectMutex_h_
69
#define ZFLIB_ZFCore
used to export symbols
Definition ZFCoreEnvDef.h:30
void(* ZFCoreMutexImplCallbackUnlock)(void *token)
mutex impl
Definition ZFCoreMutex.h:16
void(* ZFCoreMutexImplCallbackLock)(void *token)
mutex impl
Definition ZFCoreMutex.h:14
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:180
#define ZF_IN_OPT
dummy macro that shows the param used as optional input
Definition ZFCoreTypeDef_ClassType.h:184
_ZFT_t_zfbool zfbool
bool type
Definition ZFCoreTypeDef_CoreType.h:103
#define zfnull
same as NULL, defined for future use
Definition ZFCoreTypeDef_CoreType.h:88
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
types for ZFFramework
void(* ZFObjectMutexImplCallbackDealloc)(void *implObject)
see ZFObjectMutexImplSet
Definition ZFObjectMutex.h:16
ZFCoreMutexImplCallbackUnlock ZFObjectMutexImplCallbackUnlock
see ZFObjectMutexImplSet
Definition ZFObjectMutex.h:20
ZFObjectMutexImplCallbackInit ZFObjectMutexImplGetInit(void)
see ZFObjectMutexImplSet
Definition ZFObjectMutex.h:54
void *(* ZFObjectMutexImplCallbackInit)(void)
see ZFObjectMutexImplSet
Definition ZFObjectMutex.h:14
void ZFObjectMutexImplSet(ZFObjectMutexImplCallbackInit implInit=zft_zfnull, ZFObjectMutexImplCallbackDealloc implDealloc=zft_zfnull, ZFObjectMutexImplCallbackLock implLock=zft_zfnull, ZFObjectMutexImplCallbackUnlock implUnlock=zft_zfnull, ZFObjectMutexImplCallbackTryLock implTryLock=zft_zfnull)
change the implementation for mutex
ZFObjectMutexImplCallbackLock ZFObjectMutexImplGetLock(void)
see ZFObjectMutexImplSet
Definition ZFObjectMutex.h:58
ZFCoreMutexImplCallbackLock ZFObjectMutexImplCallbackLock
see ZFObjectMutexImplSet
Definition ZFObjectMutex.h:18
ZFObjectMutexImplCallbackDealloc ZFObjectMutexImplGetDealloc(void)
see ZFObjectMutexImplSet
Definition ZFObjectMutex.h:56
zfbool(* ZFObjectMutexImplCallbackTryLock)(void *implObject)
see ZFObjectMutexImplSet
Definition ZFObjectMutex.h:22
ZFObjectMutexImplCallbackUnlock ZFObjectMutexImplGetUnlock(void)
see ZFObjectMutexImplSet
Definition ZFObjectMutex.h:60
zfbool ZFObjectMutexImplAvailable(void)
see ZFObjectMutexImplSet
Definition ZFObjectMutex.h:65
ZFObjectMutexImplCallbackTryLock ZFObjectMutexImplGetTryLock(void)
see ZFObjectMutexImplSet
Definition ZFObjectMutex.h:62