STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
__gnu_profile::__reentrance_guard Struct Reference

Reentrance guard. More...

#include <profile/impl/profiler.h>

Public Member Functions

 __reentrance_guard ()
 
 ~__reentrance_guard ()
 

Static Public Member Functions

static bool __get_in ()
 
static bool__inside ()
 

Detailed Description

Reentrance guard.

Mechanism to protect all __gnu_profile operations against recursion, multithreaded and exception reentrance.

Constructor & Destructor Documentation

__gnu_profile::__reentrance_guard::__reentrance_guard ( )
inline
79 { }
__gnu_profile::__reentrance_guard::~__reentrance_guard ( )
inline
80 { __inside() = false; }
static bool & __inside()
Definition: profiler.h:73

Member Function Documentation

static bool __gnu_profile::__reentrance_guard::__get_in ( )
inlinestatic
62  {
63  if (__inside() == true)
64  return false;
65  else
66  {
67  __inside() = true;
68  return true;
69  }
70  }
static bool & __inside()
Definition: profiler.h:73
static bool& __gnu_profile::__reentrance_guard::__inside ( )
inlinestatic
74  {
75  static __thread bool _S_inside(false);
76  return _S_inside;
77  }

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