PCL
|
Classes | |
class | pcl::AutoReentrancyGuard |
Automatic reentrancy guard sentinel. More... | |
Macros | |
#define | PCL_CLASS_REENTRANCY_GUARD mutable pcl::AtomicInt __pcl_guard__; |
#define | PCL_CLASS_REENTRANCY_GUARDED_BEGIN |
#define | PCL_MEMBER_REENTRANCY_GUARD(member) mutable pcl::AtomicInt __pcl_guard_##member##__; |
#define | PCL_MEMBER_REENTRANCY_GUARDED_BEGIN(member) |
#define | PCL_REENTRANCY_GUARDED_BEGIN |
#define | PCL_REENTRANCY_GUARDED_END |
#define PCL_CLASS_REENTRANCY_GUARD mutable pcl::AtomicInt __pcl_guard__; |
Declares a class data member for class-wide protection of non-reentrant member functions with the PCL_CLASS_REENTRANCY_GUARDED_BEGIN and PCL_REENTRANCY_GUARDED_END macros.
Example:
In this example the bar1 and bar2 member functions are protected against reentrant execution. Note that reentrancy protection is a per-instance, class-wide property in this case: the bar1() and bar2() functions can be executed simultaneously for different objects, but they cannot be re-entered for the same instance. Furthermore, one of these functions cannot call the other for the same object, since both share the same reentrancy guard member in the foo class.
See the AutoReentrancyGuard class for more information on the PCL implementation of reentrancy protection.
#define PCL_CLASS_REENTRANCY_GUARDED_BEGIN |
This macro, along with PCL_CLASS_REENTRANCY_GUARD and PCL_REENTRANCY_GUARDED_END, simplifies per-instance protection of non-reentrant class member functions. See PCL_CLASS_REENTRANCY_GUARD for an example.
See the AutoReentrancyGuard class for more information on the PCL implementation of reentrancy protection.
#define PCL_MEMBER_REENTRANCY_GUARD | ( | member | ) | mutable pcl::AtomicInt __pcl_guard_##member##__; |
Declares a class data member for protection of a specific non-reentrant member function with the PCL_MEMBER_REENTRANCY_GUARDED_BEGIN and PCL_REENTRANCY_GUARDED_END macros.
Example:
In this example the bar1 and bar2 member functions are protected against reentrant execution. Note that reentrancy protection is a per-instance, function-specific property in this case: the bar1() and bar2() functions can be executed simultaneously for different objects, but they cannot be re-entered for the same instance. Since each member function uses its own reentrancy guard member in the foo class, each of them can safely call the other for the same object.
See the AutoReentrancyGuard class for more information on the PCL implementation of reentrancy protection.
#define PCL_MEMBER_REENTRANCY_GUARDED_BEGIN | ( | member | ) |
This macro, along with PCL_MEMBER_REENTRANCY_GUARD and PCL_REENTRANCY_GUARDED_END, simplifies per-instance protection of specific non-reentrant member functions. See PCL_MEMBER_REENTRANCY_GUARD for an example.
See the AutoReentrancyGuard class for more information on the PCL implementation of reentrancy protection.
#define PCL_REENTRANCY_GUARDED_BEGIN |
This macro along with PCL_REENTRANCY_GUARDED_END simplifies protection of non-reentrant code. See the AutoReentrancyGuard class for detailed information and examples.