Main MRPT website > C++ reference for MRPT 1.5.7
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

◆ launchTestWithTimeout()

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().

◆ my_CriticalSections_Multi()

void my_CriticalSections_Multi ( )

◆ my_CriticalSections_Simple()

void my_CriticalSections_Simple ( )

◆ TEST() [1/2]

TEST ( Synch  ,
CriticalSections_Simple   
)

◆ TEST() [2/2]

TEST ( Synch  ,
CriticalSections_Multi   
)

◆ thread_example()

void thread_example ( int  id)

Variable Documentation

◆ counter

int counter = 0

◆ csCounter

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.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019