Main MRPT website > C++ reference for MRPT 1.5.9
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.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020