feisty meow concerns codebase  2.140
test_mutex.cpp File Reference
Include dependency graph for test_mutex.cpp:

Go to the source code of this file.

Macros

#define LOG(to_print)   CLASS_EMERGENCY_LOG(program_wide_logger::get(), to_print)
 
#define UNIT_BASE_THIS_OBJECT   c_testing
 
#define UNIT_BASE_THIS_OBJECT   (*this)
 

Functions

mutexguard ()
 
void test_recursive_locking (chaos &_rando)
 

Variables

const int MAX_MUTEX_TIMING_TEST = 2000000
 
const int DEFAULT_FISH = 32
 
const int DEFAULT_RUN_TIME = 2 * SECOND_ms
 
const int THREAD_PAUSE_LOWEST = 0
 
const int THREAD_PAUSE_HIGHEST = 48
 
const int MIN_SAME_THREAD_LOCKING_TESTS = 100
 
const int MAX_SAME_THREAD_LOCKING_TESTS = 1000
 
int concurrent_biters = 0
 
int grab_lock = 0
 
astring protected_string
 

Macro Definition Documentation

◆ LOG

#define LOG (   to_print)    CLASS_EMERGENCY_LOG(program_wide_logger::get(), to_print)

Definition at line 78 of file test_mutex.cpp.

◆ UNIT_BASE_THIS_OBJECT [1/2]

#define UNIT_BASE_THIS_OBJECT   c_testing

Definition at line 199 of file test_mutex.cpp.

◆ UNIT_BASE_THIS_OBJECT [2/2]

#define UNIT_BASE_THIS_OBJECT   (*this)

Definition at line 199 of file test_mutex.cpp.

Function Documentation

◆ guard()

mutex& guard ( )

Definition at line 71 of file test_mutex.cpp.

Referenced by test_recursive_locking().

◆ test_recursive_locking()

Variable Documentation

◆ concurrent_biters

int concurrent_biters = 0

Definition at line 65 of file test_mutex.cpp.

◆ DEFAULT_FISH

const int DEFAULT_FISH = 32

Definition at line 50 of file test_mutex.cpp.

◆ DEFAULT_RUN_TIME

const int DEFAULT_RUN_TIME = 2 * SECOND_ms

Definition at line 53 of file test_mutex.cpp.

◆ grab_lock

int grab_lock = 0

Definition at line 68 of file test_mutex.cpp.

◆ MAX_MUTEX_TIMING_TEST

const int MAX_MUTEX_TIMING_TEST = 2000000

Definition at line 47 of file test_mutex.cpp.

◆ MAX_SAME_THREAD_LOCKING_TESTS

const int MAX_SAME_THREAD_LOCKING_TESTS = 1000

Definition at line 62 of file test_mutex.cpp.

Referenced by test_recursive_locking().

◆ MIN_SAME_THREAD_LOCKING_TESTS

const int MIN_SAME_THREAD_LOCKING_TESTS = 100

Definition at line 61 of file test_mutex.cpp.

Referenced by test_recursive_locking().

◆ protected_string

astring protected_string

Definition at line 75 of file test_mutex.cpp.

◆ THREAD_PAUSE_HIGHEST

const int THREAD_PAUSE_HIGHEST = 48

Definition at line 57 of file test_mutex.cpp.

◆ THREAD_PAUSE_LOWEST

const int THREAD_PAUSE_LOWEST = 0

Definition at line 56 of file test_mutex.cpp.