Go to the source code of this file.
|
| | mrpt |
| | This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
|
| |
| | mrpt::utils |
| | Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
|
| |
| | mrpt::synch |
| | This namespace provides multitask, synchronization utilities.
|
| |
|
| #define | THREADSAFE_OPERATION(_CRITSECT_OBJ, CODE_TO_EXECUTE) |
| | A macro for protecting a given piece of code with a critical section; for example: More...
|
| |
◆ THREADSAFE_OPERATION
| #define THREADSAFE_OPERATION |
( |
|
_CRITSECT_OBJ, |
|
|
|
CODE_TO_EXECUTE |
|
) |
| |
Value:{ \
mrpt::synch::CCriticalSectionLocker lock(&_CRITSECT_OBJ); \
CODE_TO_EXECUTE \
}
A macro for protecting a given piece of code with a critical section; for example:
CCriticalSection cs;
...
THREADSAFE_OPERATION(cs,
obj.foo(); )
...
- See also
- CCriticalSectionLocker, CThreadSafeVariable
Definition at line 124 of file CCriticalSection.h.