Some useful macros for function synchronization. More...
Go to the source code of this file.
Macros | |
| #define | SYNCHRONIZED_STATIC(function_name, TRet, args, qualifiers, runnable) |
| Declare a static function synchronized with a given runnable. More... | |
| #define | SYNCHRONIZED_METHOD(function_name, TRet, args, qualifiers, runnable) |
| Declare a method synchronized with a given runnable. More... | |
Some useful macros for function synchronization.
| #define SYNCHRONIZED_METHOD | ( | function_name, | |
| TRet, | |||
| args, | |||
| qualifiers, | |||
| runnable | |||
| ) |
Declare a method synchronized with a given runnable.
The code need to implement that no sync funcion (so, a normal funcion) which its call is managed by this macro. For example, if we declare a synchronized function as
SYNCHRONIZED_METHOD( f1,string,(int,float),,sRunnable )
, we have to implement the neccesary code for f1_sync, as:
| [in] | function_name. | funtion to create |
| [in] | TRet. | Return type |
| [in] | args | parameter types (without parameter names), in the form (T1,T2,...) [0..10] number of parameters |
| [in] | qualifiers | extra function qualifiers. Can be left empty |
| [in] | runnable | Runnable (pointer) in which function is executed |
| #define SYNCHRONIZED_STATIC | ( | function_name, | |
| TRet, | |||
| args, | |||
| qualifiers, | |||
| runnable | |||
| ) |
Declare a static function synchronized with a given runnable.
The code need to implement that no sync funcion (so, a normal funcion) which its call is managed by this macro. For example, if we declare a synchronized function as
SYNCHRONIZED_STATIC( f1,string,(int),noexcept,sRunnable )
, we have to implement the neccesary code for f1_sync, as:
| [in] | TRet. | Return type |
| [in] | function_name. | funtion to create |
| [in] | args | parameter types (without parameter names), in the form (T1,T2,...) [0..10] number of parameters |
| [in] | qualifiers | extra function qualifiers. Can be left empty |
| [in] | runnable | Runnable (pointer) in which function is executed |