# TMCSafeSection Class Reference

Inheritance diagram for TMCSafeSection:

List of all members.

## Public Member Functions
| TMCSafeSection ()
| ~TMCSafeSection ()
TMCCriticalSection * | GetCS ()
boolean | IsMainThreadInside () const
void | SetMainThreadInside (boolean value)
void | Enter ()
void | Leave ()
## Protected Attributes
TMCCriticalSection * | fCS
boolean | fMainThreadInside

## Detailed Description

This class is intended to protect cooperative threads (and preemptive ones) on the pc cooperative threads are not affected by critical sections, on the mac they deadlock. Both cases are bad. For now this class is to protect a single function. When we'll need the same thread to enter twice in the section, we'll need to store the cooperative thread id.

## Constructor & Destructor Documentation

TMCSafeSection::TMCSafeSection | ( |  | ) | `[inline]`

TMCSafeSection::~TMCSafeSection | ( |  | ) | `[inline]`

## Member Function Documentation

void TMCSafeSection::Enter | ( |  | ) | `[inline]`

TMCCriticalSection* TMCSafeSection::GetCS | ( |  | ) | `[inline]`

boolean TMCSafeSection::IsMainThreadInside | ( |  | ) | const`[inline]`

void TMCSafeSection::Leave | ( |  | ) | `[inline]`

void TMCSafeSection::SetMainThreadInside | ( | boolean | value | ) | `[inline]`

## Member Data Documentation

TMCCriticalSection* TMCSafeSection::fCS`[protected]`

boolean TMCSafeSection::fMainThreadInside`[protected]`

The documentation for this class was generated from the following file:

- MCSMPSafeCriticalSections.h