Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > 4bc66056a634db26a1f4d0845dc41ca6 > files > 335

mrpt-doc-0.9.5-0.1.20110925svn2670.fc16.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>CCriticalSection.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<div align="left"><a href="http://www.mrpt.org/">Main MRPT website</a> &gt; <b>C++ reference</b> </div>
<div align="right">
<a href="index.html"><img border="0" src="mrpt_logo.png" alt="MRPT logo"></a>
</div>
<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
          <div class="left">
            <form id="FSearchBox" action="search.php" method="get">
              <img id="MSearchSelect" src="search/mag.png" alt=""/>
              <input type="text" id="MSearchField" name="query" value="Search" size="20" accesskey="S" 
                     onfocus="searchBox.OnSearchFieldFocus(true)" 
                     onblur="searchBox.OnSearchFieldFocus(false)"/>
            </form>
          </div><div class="right"></div>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#define-members">Defines</a>  </div>
  <div class="headertitle">
<div class="title">CCriticalSection.h File Reference</div>  </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="utils__defs_8h_source.html">mrpt/utils/utils_defs.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="_c_stream_8h_source.html">mrpt/utils/CStream.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="_c_referenced_mem_block_8h_source.html">mrpt/utils/CReferencedMemBlock.h</a>&gt;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for CCriticalSection.h:</div>
<div class="dyncontent">
<div class="center"><img src="_c_critical_section_8h__incl.png" border="0" usemap="#_c_critical_section_8h" alt=""/></div>
<map name="_c_critical_section_8h" id="_c_critical_section_8h">
<area shape="rect" id="node3" href="utils__defs_8h.html" title="mrpt/utils/utils_defs.h" alt="" coords="2852,229,2999,256"/><area shape="rect" id="node120" href="_c_stream_8h.html" title="mrpt/utils/CStream.h" alt="" coords="2766,80,2908,107"/><area shape="rect" id="node132" href="_c_referenced_mem_block_8h.html" title="mrpt/utils/CReferencedMemBlock.h" alt="" coords="2993,80,3223,107"/><area shape="rect" id="node7" href="os_8h.html" title="mrpt/system/os.h" alt="" coords="2719,304,2843,331"/><area shape="rect" id="node20" href="base_2include_2mrpt_2base_2link__pragmas_8h.html" title="mrpt/base/link_pragmas.h" alt="" coords="2721,528,2892,555"/><area shape="rect" id="node23" href="boost__join_8h.html" title="mrpt/utils/boost_join.h" alt="" coords="2971,603,3121,629"/><area shape="rect" id="node25" href="base_2include_2mrpt_2utils_2types_8h.html" title="mrpt/utils/types.h" alt="" coords="1616,379,1739,405"/><area shape="rect" id="node67" href="mrpt__macros_8h.html" title="mrpt/utils/mrpt_macros.h" alt="" coords="2981,379,3147,405"/><area shape="rect" id="node70" href="compiler__fixes_8h.html" title="mrpt/utils/compiler_fixes.h" alt="" coords="3325,304,3499,331"/><area shape="rect" id="node97" href="smart__ptr_8hpp.html" title="mrpt/otherlibs/stlplus/smart_ptr.hpp" alt="" coords="259,379,485,405"/><area shape="rect" id="node114" href="bits_8h.html" title="mrpt/utils/bits.h" alt="" coords="293,304,404,331"/><area shape="rect" id="node37" href="mrpt__stdint_8h.html" title="mrpt/utils/mrpt_stdint.h" alt="" coords="1287,528,1443,555"/><area shape="rect" id="node40" href="mrpt__inttypes_8h.html" title="mrpt/utils/mrpt_inttypes.h" alt="" coords="1157,453,1328,480"/><area shape="rect" id="node43" href="math__frwds_8h.html" title="mrpt/math/math_frwds.h" alt="" coords="1723,453,1887,480"/><area shape="rect" id="node59" href="_dense.html" title="Eigen/Dense" alt="" coords="1990,453,2087,480"/><area shape="rect" id="node99" href="containers__fixes_8hpp.html" title="containers_fixes.hpp" alt="" coords="67,528,209,555"/><area shape="rect" id="node101" href="exceptions_8hpp.html" title="exceptions.hpp" alt="" coords="101,453,211,480"/><area shape="rect" id="node108" href="atomic__incr_8h.html" title="mrpt/synch/atomic_incr.h" alt="" coords="410,453,579,480"/><area shape="rect" id="node112" href="smart__ptr_8tpp.html" title="smart_ptr.tpp" alt="" coords="236,453,335,480"/><area shape="rect" id="node116" href="_s_s_e__types_8h.html" title="mrpt/utils/SSE_types.h" alt="" coords="5,379,163,405"/><area shape="rect" id="node123" href="_c_uncopiable_8h.html" title="mrpt/utils/CUncopiable.h" alt="" coords="2754,155,2920,181"/><area shape="rect" id="node126" href="_c_object_8h.html" title="mrpt/utils/CObject.h" alt="" coords="2945,155,3084,181"/><area shape="rect" id="node129" href="exceptions_8h.html" title="mrpt/utils/exceptions.h" alt="" coords="2524,155,2677,181"/></map>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="_c_critical_section_8h__dep__incl.png" border="0" usemap="#_c_critical_section_8hdep" alt=""/></div>
<map name="_c_critical_section_8hdep" id="_c_critical_section_8hdep">
<area shape="rect" id="node3" href="_c_robot2_d_pose_estimator_8h.html" title="CRobot2DPoseEstimator.h" alt="" coords="662,80,843,107"/><area shape="rect" id="node33" href="synch_8h.html" title="synch.h" alt="" coords="1444,155,1511,181"/><area shape="rect" id="node61" href="_c_rovio_8h.html" title="CRovio.h" alt="" coords="2272,304,2348,331"/><area shape="rect" id="node77" href="_m_t__buffer_8h.html" title="MT_buffer.h" alt="" coords="1342,80,1434,107"/><area shape="rect" id="node80" href="_c_thread_safe_variable_8h.html" title="CThreadSafeVariable.h" alt="" coords="1510,80,1667,107"/><area shape="rect" id="node84" href="_c_thread_safe_queue_8h.html" title="CThreadSafeQueue.h" alt="" coords="956,80,1103,107"/><area shape="rect" id="node98" href="_c_generic_memory_pool_8h.html" title="CGenericMemoryPool.h" alt="" coords="1148,80,1308,107"/><area shape="rect" id="node101" href="_c_log_8h.html" title="CLog.h" alt="" coords="867,80,931,107"/><area shape="rect" id="node104" href="_c_renderizable_8h.html" title="CRenderizable.h" alt="" coords="2726,80,2844,107"/><area shape="rect" id="node5" href="poses_8h.html" title="poses.h" alt="" coords="298,155,366,181"/><area shape="rect" id="node29" href="_c_metric_map_builder_i_c_p_8h.html" title="CMetricMapBuilderICP.h" alt="" coords="776,304,942,331"/><area shape="rect" id="node7" href="base_8h.html" title="base.h" alt="" coords="688,304,750,331"/><area shape="rect" id="node13" href="base_2include_2mrpt_2utils_8h.html" title="utils.h" alt="" coords="396,229,452,256"/><area shape="rect" id="node16" href="_c_abstract_holonomic_reactive_method_8h.html" title="CAbstractHolonomicReactiveMethod.h" alt="" coords="300,304,548,331"/><area shape="rect" id="node18" href="_c_reactive_navigation_system_8h.html" title="CReactiveNavigationSystem.h" alt="" coords="160,379,363,405"/><area shape="rect" id="node21" href="_c_abstract_reactive_navigation_system_8h.html" title="CAbstractReactiveNavigationSystem.h" alt="" coords="24,304,275,331"/><area shape="rect" id="node24" href="_c_p_r_r_t_navigator_8h.html" title="CPRRTNavigator.h" alt="" coords="478,229,612,256"/><area shape="rect" id="node27" href="scanmatching_2scan__matching_8h.html" title="scan_matching.h" alt="" coords="148,229,268,256"/><area shape="rect" id="node9" href="_c_image___s_s_e3_8cpp.html" title="CImage_SSE3.cpp" alt="" coords="660,379,794,405"/><area shape="rect" id="node11" href="_c_image___s_s_e2_8cpp.html" title="CImage_SSE2.cpp" alt="" coords="501,379,635,405"/><area shape="rect" id="node31" href="slam_8h.html" title="slam.h" alt="" coords="828,379,890,405"/><area shape="rect" id="node36" href="_c_face_detection_8h.html" title="CFaceDetection.h" alt="" coords="967,304,1095,331"/><area shape="rect" id="node40" href="_c_base_g_u_i_window_8h.html" title="CBaseGUIWindow.h" alt="" coords="1411,229,1555,256"/><area shape="rect" id="node42" href="_wx_subsystem_8h.html" title="WxSubsystem.h" alt="" coords="1580,229,1698,256"/><area shape="rect" id="node44" href="_wx_utils_8h.html" title="WxUtils.h" alt="" coords="1722,229,1800,256"/><area shape="rect" id="node46" href="_c_local_metric_hypothesis_8h.html" title="CLocalMetricHypothesis.h" alt="" coords="1211,229,1387,256"/><area shape="rect" id="node48" href="_c_h_m_t_s_l_a_m_8h.html" title="CHMTSLAM.h" alt="" coords="1120,304,1227,331"/><area shape="rect" id="node51" href="_c2_d_range_finder_abstract_8h.html" title="C2DRangeFinderAbstract.h" alt="" coords="2065,304,2247,331"/><area shape="rect" id="node55" href="_c_generic_sensor_8h.html" title="CGenericSensor.h" alt="" coords="1978,229,2107,256"/><area shape="rect" id="node58" href="_c_board_sonars_8h.html" title="CBoardSonars.h" alt="" coords="1870,304,1988,331"/><area shape="rect" id="node66" href="_c_n_t_r_i_p_client_8h.html" title="CNTRIPClient.h" alt="" coords="1532,304,1650,331"/><area shape="rect" id="node69" href="_c_robotic_head_interface_8h.html" title="CRoboticHeadInterface.h" alt="" coords="1675,304,1846,331"/><area shape="rect" id="node74" href="_c_metric_map_builder_8h.html" title="CMetricMapBuilder.h" alt="" coords="891,229,1035,256"/><area shape="rect" id="node38" href="detectors_8h.html" title="detectors.h" alt="" coords="988,379,1074,405"/><area shape="rect" id="node53" href="hwdrivers_8h.html" title="hwdrivers.h" alt="" coords="1933,379,2022,405"/><area shape="rect" id="node86" href="_c_file_system_watcher_8h.html" title="CFileSystemWatcher.h" alt="" coords="950,155,1108,181"/><area shape="rect" id="node94" href="_c_message_queue_8h.html" title="CMessageQueue.h" alt="" coords="792,155,926,181"/><area shape="rect" id="node88" href="system_8h.html" title="system.h" alt="" coords="790,229,866,256"/><area shape="rect" id="node106" href="opengl_8h.html" title="opengl.h" alt="" coords="2777,379,2847,405"/><area shape="rect" id="node108" href="gl__utils_8h.html" title="gl_utils.h" alt="" coords="3244,155,3318,181"/><area shape="rect" id="node111" href="_c_renderizable_display_list_8h.html" title="CRenderizableDisplayList.h" alt="" coords="2922,155,3106,181"/><area shape="rect" id="node114" href="_c_open_g_l_scene_8h.html" title="COpenGLScene.h" alt="" coords="2284,229,2412,256"/><area shape="rect" id="node118" href="_c_camera_8h.html" title="CCamera.h" alt="" coords="3130,155,3219,181"/><area shape="rect" id="node121" href="_c_set_of_objects_8h.html" title="CSetOfObjects.h" alt="" coords="2724,155,2847,181"/><area shape="rect" id="node123" href="_c_octree_point_renderer_8h.html" title="COctreePointRenderer.h" alt="" coords="2816,229,2980,256"/><area shape="rect" id="node125" href="_c_point_cloud_8h.html" title="CPointCloud.h" alt="" coords="3107,304,3214,331"/><area shape="rect" id="node128" href="_c_point_cloud_coloured_8h.html" title="CPointCloudColoured.h" alt="" coords="2674,304,2832,331"/><area shape="rect" id="node135" href="_c_text_8h.html" title="CText.h" alt="" coords="2530,155,2599,181"/><area shape="rect" id="node138" href="_c_text_message_capable_8h.html" title="CTextMessageCapable.h" alt="" coords="2335,155,2506,181"/></map>
</div>
</div>
<p><a href="_c_critical_section_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1synch_1_1_c_critical_section.html">mrpt::synch::CCriticalSection</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This class provides simple critical sections functionality.  <a href="classmrpt_1_1synch_1_1_c_critical_section.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1synch_1_1_c_critical_section_locker.html">mrpt::synch::CCriticalSectionLocker</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A class acquiring a <a class="el" href="classmrpt_1_1synch_1_1_c_critical_section.html" title="This class provides simple critical sections functionality.">CCriticalSection</a> at its constructor, and releasing it at destructor.  <a href="classmrpt_1_1synch_1_1_c_critical_section_locker.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt.html">mrpt</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries. </p>
<br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1synch.html">mrpt::synch</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><p>This namespace provides multitask, synchronization utilities. </p>
<br/></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_c_critical_section_8h.html#a063b848901ed4201c26e195505d31faf">THREADSAFE_OPERATION</a>(_CRITSECT_OBJ, CODE_TO_EXECUTE)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A macro for protecting a given piece of code with a critical section; for example:  <a href="#a063b848901ed4201c26e195505d31faf"></a><br/></td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a063b848901ed4201c26e195505d31faf"></a><!-- doxytag: member="CCriticalSection.h::THREADSAFE_OPERATION" ref="a063b848901ed4201c26e195505d31faf" args="(_CRITSECT_OBJ, CODE_TO_EXECUTE)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define THREADSAFE_OPERATION</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_CRITSECT_OBJ, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">CODE_TO_EXECUTE&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
                                        mrpt::synch::CCriticalSectionLocker lock(&amp;_CRITSECT_OBJ); \
                                        CODE_TO_EXECUTE \
                                }
</pre></div>
<p>A macro for protecting a given piece of code with a critical section; for example: </p>
<div class="fragment"><pre class="fragment">    CCriticalSection  <a class="code" href="cs_8h.html#a44e471a015cf32e012cffef17e81b6db">cs</a>;
    MyObject  obj;
    ...

    <a class="code" href="_c_critical_section_8h.html#a063b848901ed4201c26e195505d31faf" title="A macro for protecting a given piece of code with a critical section; for example:">THREADSAFE_OPERATION</a>(<a class="code" href="structcs__sparse.html">cs</a>,  obj.foo(); )
    ...
    <a class="code" href="_c_critical_section_8h.html#a063b848901ed4201c26e195505d31faf" title="A macro for protecting a given piece of code with a critical section; for example:">THREADSAFE_OPERATION</a>(<a class="code" href="structcs__sparse.html">cs</a>,  obj.foo(); obj.bar(); }
</pre></div><dl class="see"><dt><b>See also:</b></dt><dd>CCriticalSectionLocker, CThreadSafeVariable </dd></dl>

<p>Definition at line <a class="el" href="_c_critical_section_8h_source.html#l00138">138</a> of file <a class="el" href="_c_critical_section_8h_source.html">CCriticalSection.h</a>.</p>

</div>
</div>
</div>
<br><hr><br> <table border="0" width="100%"> <tr> <td> Page generated by <a href="http://www.doxygen.org" target="_blank">Doxygen 1.7.5</a> for MRPT 0.9.5 SVN: at Sun Sep 25 17:20:18 UTC 2011</td><td></td> <td width="100"> </td> <td width="150">  </td></tr> </table>  </body></html>