Main MRPT website > C++ reference for MRPT 1.5.6
Classes | Functions | Variables
CCriticalSection_unittest.cpp File Reference
#include <mrpt/synch.h>
#include <mrpt/utils/CTicTac.h>
#include <mrpt/random.h>
#include <mrpt/system.h>
#include <gtest/gtest.h>
Include dependency graph for CCriticalSection_unittest.cpp:

Go to the source code of this file.

Classes

struct  TAux
 

Functions

void launchTestWithTimeout (void(*func)(void), double timeout_secs, const std::string &fail_msg)
 
void my_CriticalSections_Simple ()
 
 TEST (Synch, CriticalSections_Simple)
 
void thread_example (int id)
 
void my_CriticalSections_Multi ()
 
 TEST (Synch, CriticalSections_Multi)
 

Variables

CCriticalSection csCounter
 
int counter = 0
 

Function Documentation

void launchTestWithTimeout ( void(*)(void func,
double  timeout_secs,
const std::string fail_msg 
)

Definition at line 39 of file CCriticalSection_unittest.cpp.

References TAux::run(), mrpt::system::sleep(), and mrpt::utils::CTicTac::Tic().

Referenced by TEST().

void my_CriticalSections_Multi ( )
void my_CriticalSections_Simple ( )
TEST ( Synch  ,
CriticalSections_Simple   
)
TEST ( Synch  ,
CriticalSections_Multi   
)
void thread_example ( int  id)

Variable Documentation

int counter = 0
CCriticalSection csCounter

Definition at line 73 of file CCriticalSection_unittest.cpp.

Referenced by my_CriticalSections_Multi(), and thread_example().




Page generated by Doxygen 1.8.6 for MRPT 1.5.6 Git: 4c65e84 Tue Apr 24 08:18:17 2018 +0200 at mar abr 24 08:26:17 CEST 2018