| Current File : //usr/share/doc/dbus/api/group__DBusThreadsInternals.html |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>D-Bus: Thread functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">D-Bus
 <span id="projectnumber">1.8.20</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.6.1 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#typedef-members">Typedefs</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Thread functions</div> </div>
<div class="ingroups"><a class="el" href="group__DBusInternals.html">D-Bus secret internal implementation details</a></div></div><!--header-->
<div class="contents">
<p><a class="el" href="group__DBusThreadsInternals.html#gaeb20c411a096aaf067918eb574f121d5" title="Locks a mutex.">_dbus_rmutex_lock()</a>, etc.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structDBusRMutex.html">DBusRMutex</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusThreadsInternals.html#ga5317a58c6ec622c81615dcf2d87aa92b">DBusRMutex</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">A mutex which is recursive if possible, else non-recursive. <a href="#ga5317a58c6ec622c81615dcf2d87aa92b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structDBusCMutex.html">DBusCMutex</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusThreadsInternals.html#ga3ab2e6d6f2aa71121ee5d7913cc4c4e9">DBusCMutex</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">A mutex suitable for use with condition variables. <a href="#ga3ab2e6d6f2aa71121ee5d7913cc4c4e9"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusThreadsInternals.html#ga191deedb97c76fae82bdbc8e1559a849">_dbus_rmutex_new_at_location</a> (<a class="el" href="structDBusRMutex.html">DBusRMutex</a> **location_p)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new mutex or creates a no-op mutex if threads are not initialized. <a href="#ga191deedb97c76fae82bdbc8e1559a849"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusThreadsInternals.html#ga89495162caac2ace36c6b9c2031bc962">_dbus_cmutex_new_at_location</a> (<a class="el" href="structDBusCMutex.html">DBusCMutex</a> **location_p)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new mutex or creates a no-op mutex if threads are not initialized. <a href="#ga89495162caac2ace36c6b9c2031bc962"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae1c95a3f47bcc78d32fc0a5a8ed37c91"></a><!-- doxytag: member="DBusThreadsInternals::_dbus_rmutex_free_at_location" ref="gae1c95a3f47bcc78d32fc0a5a8ed37c91" args="(DBusRMutex **location_p)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusThreadsInternals.html#gae1c95a3f47bcc78d32fc0a5a8ed37c91">_dbus_rmutex_free_at_location</a> (<a class="el" href="structDBusRMutex.html">DBusRMutex</a> **location_p)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Frees a <a class="el" href="structDBusRMutex.html">DBusRMutex</a>; does nothing if passed a <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> pointer. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga20ec8aeb88b1f65445a4d3c1c0bd0048"></a><!-- doxytag: member="DBusThreadsInternals::_dbus_cmutex_free_at_location" ref="ga20ec8aeb88b1f65445a4d3c1c0bd0048" args="(DBusCMutex **location_p)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusThreadsInternals.html#ga20ec8aeb88b1f65445a4d3c1c0bd0048">_dbus_cmutex_free_at_location</a> (<a class="el" href="structDBusCMutex.html">DBusCMutex</a> **location_p)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Frees a <a class="el" href="structDBusCMutex.html">DBusCMutex</a>; does nothing if passed a <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> pointer. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusThreadsInternals.html#gaeb20c411a096aaf067918eb574f121d5">_dbus_rmutex_lock</a> (<a class="el" href="structDBusRMutex.html">DBusRMutex</a> *mutex)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Locks a mutex. <a href="#gaeb20c411a096aaf067918eb574f121d5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusThreadsInternals.html#gabea1bdc19c155bca909839090c05eee2">_dbus_cmutex_lock</a> (<a class="el" href="structDBusCMutex.html">DBusCMutex</a> *mutex)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Locks a mutex. <a href="#gabea1bdc19c155bca909839090c05eee2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusThreadsInternals.html#ga5946b9a5ea3e12a81a798b575b45c62f">_dbus_rmutex_unlock</a> (<a class="el" href="structDBusRMutex.html">DBusRMutex</a> *mutex)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Unlocks a mutex. <a href="#ga5946b9a5ea3e12a81a798b575b45c62f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusThreadsInternals.html#gad199edcd1bb88cfd2e9dcfb47cbc732f">_dbus_cmutex_unlock</a> (<a class="el" href="structDBusCMutex.html">DBusCMutex</a> *mutex)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Unlocks a mutex. <a href="#gad199edcd1bb88cfd2e9dcfb47cbc732f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structDBusCondVar.html">DBusCondVar</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusThreadsInternals.html#ga454b138bcbd419d38b3da6b707e46998">_dbus_condvar_new</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new condition variable using the function supplied to <a class="el" href="group__DBusThreads.html#gac7b8a7001befc3eaa8c6b043151008dc" title="Initializes threads, like dbus_threads_init_default().">dbus_threads_init()</a>, or creates a no-op condition variable if threads are not initialized. <a href="#ga454b138bcbd419d38b3da6b707e46998"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusThreadsInternals.html#ga859c5830e3c212323c1d6dafee3858a1">_dbus_condvar_new_at_location</a> (<a class="el" href="structDBusCondVar.html">DBusCondVar</a> **location_p)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This does the same thing as _dbus_condvar_new. <a href="#ga859c5830e3c212323c1d6dafee3858a1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaff04b7377b6ab0cc22fee6a2811dde84"></a><!-- doxytag: member="DBusThreadsInternals::_dbus_condvar_free" ref="gaff04b7377b6ab0cc22fee6a2811dde84" args="(DBusCondVar *cond)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusThreadsInternals.html#gaff04b7377b6ab0cc22fee6a2811dde84">_dbus_condvar_free</a> (<a class="el" href="structDBusCondVar.html">DBusCondVar</a> *cond)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Frees a conditional variable created with dbus_condvar_new(); does nothing if passed a <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> pointer. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga29444a34b569fca22fac48067832aacd"></a><!-- doxytag: member="DBusThreadsInternals::_dbus_condvar_free_at_location" ref="ga29444a34b569fca22fac48067832aacd" args="(DBusCondVar **location_p)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusThreadsInternals.html#ga29444a34b569fca22fac48067832aacd">_dbus_condvar_free_at_location</a> (<a class="el" href="structDBusCondVar.html">DBusCondVar</a> **location_p)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Frees a condition variable; does nothing if passed a <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> pointer. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusThreadsInternals.html#ga6938b8a4547ce48290615990f64bd3bb">_dbus_condvar_wait</a> (<a class="el" href="structDBusCondVar.html">DBusCondVar</a> *cond, <a class="el" href="structDBusCMutex.html">DBusCMutex</a> *mutex)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Atomically unlocks the mutex and waits for the conditions variable to be signalled. <a href="#ga6938b8a4547ce48290615990f64bd3bb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusThreadsInternals.html#ga918e53c2abc48ff496f3c75566ba8bd3">_dbus_condvar_wait_timeout</a> (<a class="el" href="structDBusCondVar.html">DBusCondVar</a> *cond, <a class="el" href="structDBusCMutex.html">DBusCMutex</a> *mutex, int timeout_milliseconds)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Atomically unlocks the mutex and waits for the conditions variable to be signalled, or for a timeout. <a href="#ga918e53c2abc48ff496f3c75566ba8bd3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusThreadsInternals.html#ga8af2fd84773022e7e7ce1f21f0126203">_dbus_condvar_wake_one</a> (<a class="el" href="structDBusCondVar.html">DBusCondVar</a> *cond)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">If there are threads waiting on the condition variable, wake up exactly one. <a href="#ga8af2fd84773022e7e7ce1f21f0126203"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga1703349138323e4dbb947ab2a73c943b"></a><!-- doxytag: member="DBusThreadsInternals::_dbus_lock" ref="ga1703349138323e4dbb947ab2a73c943b" args="(DBusGlobalLock lock)" -->
<a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td><td class="memItemRight" valign="bottom"><b>_dbus_lock</b> (DBusGlobalLock lock)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga82891a341a3b79f3228b8dd2dd1b0e30"></a><!-- doxytag: member="DBusThreadsInternals::_dbus_unlock" ref="ga82891a341a3b79f3228b8dd2dd1b0e30" args="(DBusGlobalLock lock)" -->
void </td><td class="memItemRight" valign="bottom"><b>_dbus_unlock</b> (DBusGlobalLock lock)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p><a class="el" href="group__DBusThreadsInternals.html#gaeb20c411a096aaf067918eb574f121d5" title="Locks a mutex.">_dbus_rmutex_lock()</a>, etc. </p>
<p>Functions and macros related to threads and thread locks. </p>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="ga3ab2e6d6f2aa71121ee5d7913cc4c4e9"></a><!-- doxytag: member="dbus-threads-internal.h::DBusCMutex" ref="ga3ab2e6d6f2aa71121ee5d7913cc4c4e9" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="structDBusCMutex.html">DBusCMutex</a> <a class="el" href="structDBusCMutex.html">DBusCMutex</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A mutex suitable for use with condition variables. </p>
<p>This is typically non-recursive. </p>
<p>Definition at line <a class="el" href="dbus-threads-internal_8h_source.html#l00045">45</a> of file <a class="el" href="dbus-threads-internal_8h_source.html">dbus-threads-internal.h</a>.</p>
</div>
</div>
<a class="anchor" id="ga5317a58c6ec622c81615dcf2d87aa92b"></a><!-- doxytag: member="dbus-threads-internal.h::DBusRMutex" ref="ga5317a58c6ec622c81615dcf2d87aa92b" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="structDBusRMutex.html">DBusRMutex</a> <a class="el" href="structDBusRMutex.html">DBusRMutex</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A mutex which is recursive if possible, else non-recursive. </p>
<p>This is typically recursive, but that cannot be relied upon. </p>
<p>Definition at line <a class="el" href="dbus-threads-internal_8h_source.html#l00039">39</a> of file <a class="el" href="dbus-threads-internal_8h_source.html">dbus-threads-internal.h</a>.</p>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gabea1bdc19c155bca909839090c05eee2"></a><!-- doxytag: member="dbus-threads.c::_dbus_cmutex_lock" ref="gabea1bdc19c155bca909839090c05eee2" args="(DBusCMutex *mutex)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__DBusThreadsInternals.html#gabea1bdc19c155bca909839090c05eee2">_dbus_cmutex_lock</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusCMutex.html">DBusCMutex</a> * </td>
<td class="paramname"><em>mutex</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Locks a mutex. </p>
<p>Does nothing if passed a <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> pointer. Locks may be recursive if threading implementation initialized recursive locks. </p>
<p>Definition at line <a class="el" href="dbus-threads_8c_source.html#l00136">136</a> of file <a class="el" href="dbus-threads_8c_source.html">dbus-threads.c</a>.</p>
<p>References <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.</p>
</div>
</div>
<a class="anchor" id="ga89495162caac2ace36c6b9c2031bc962"></a><!-- doxytag: member="dbus-threads.c::_dbus_cmutex_new_at_location" ref="ga89495162caac2ace36c6b9c2031bc962" args="(DBusCMutex **location_p)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__DBusThreadsInternals.html#ga89495162caac2ace36c6b9c2031bc962">_dbus_cmutex_new_at_location</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusCMutex.html">DBusCMutex</a> ** </td>
<td class="paramname"><em>location_p</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a new mutex or creates a no-op mutex if threads are not initialized. </p>
<p>May return <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> even if threads are initialized, indicating out-of-memory.</p>
<p>The returned mutex is suitable for use with condition variables.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">location_p</td><td>the location of the new mutex, can return <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> on OOM </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="dbus-threads_8c_source.html#l00077">77</a> of file <a class="el" href="dbus-threads_8c_source.html">dbus-threads.c</a>.</p>
<p>References <a class="el" href="dbus-threads_8c_source.html#l00438">dbus_threads_init_default()</a>, and <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.</p>
<p>Referenced by <a class="el" href="dbus-connection_8c_source.html#l01249">_dbus_connection_new_for_transport()</a>.</p>
</div>
</div>
<a class="anchor" id="gad199edcd1bb88cfd2e9dcfb47cbc732f"></a><!-- doxytag: member="dbus-threads.c::_dbus_cmutex_unlock" ref="gad199edcd1bb88cfd2e9dcfb47cbc732f" args="(DBusCMutex *mutex)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__DBusThreadsInternals.html#gad199edcd1bb88cfd2e9dcfb47cbc732f">_dbus_cmutex_unlock</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusCMutex.html">DBusCMutex</a> * </td>
<td class="paramname"><em>mutex</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Unlocks a mutex. </p>
<p>Does nothing if passed a <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> pointer.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__DBusMacros.html#gaa8cecfc5c5c054d2875c03e77b7be15d" title="Expands to "1".">TRUE</a> on success </dd></dl>
<p>Definition at line <a class="el" href="dbus-threads_8c_source.html#l00164">164</a> of file <a class="el" href="dbus-threads_8c_source.html">dbus-threads.c</a>.</p>
<p>References <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.</p>
</div>
</div>
<a class="anchor" id="ga454b138bcbd419d38b3da6b707e46998"></a><!-- doxytag: member="dbus-threads.c::_dbus_condvar_new" ref="ga454b138bcbd419d38b3da6b707e46998" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structDBusCondVar.html">DBusCondVar</a>* <a class="el" href="group__DBusThreadsInternals.html#ga454b138bcbd419d38b3da6b707e46998">_dbus_condvar_new</a> </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a new condition variable using the function supplied to <a class="el" href="group__DBusThreads.html#gac7b8a7001befc3eaa8c6b043151008dc" title="Initializes threads, like dbus_threads_init_default().">dbus_threads_init()</a>, or creates a no-op condition variable if threads are not initialized. </p>
<p>May return <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> even if threads are initialized, indicating out-of-memory.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>new mutex or <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> </dd></dl>
<p>Definition at line <a class="el" href="dbus-threads_8c_source.html#l00181">181</a> of file <a class="el" href="dbus-threads_8c_source.html">dbus-threads.c</a>.</p>
<p>References <a class="el" href="dbus-threads_8c_source.html#l00438">dbus_threads_init_default()</a>, and <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.</p>
<p>Referenced by <a class="el" href="dbus-threads_8c_source.html#l00199">_dbus_condvar_new_at_location()</a>.</p>
</div>
</div>
<a class="anchor" id="ga859c5830e3c212323c1d6dafee3858a1"></a><!-- doxytag: member="dbus-threads.c::_dbus_condvar_new_at_location" ref="ga859c5830e3c212323c1d6dafee3858a1" args="(DBusCondVar **location_p)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__DBusThreadsInternals.html#ga859c5830e3c212323c1d6dafee3858a1">_dbus_condvar_new_at_location</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusCondVar.html">DBusCondVar</a> ** </td>
<td class="paramname"><em>location_p</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>This does the same thing as _dbus_condvar_new. </p>
<p>It however gives another level of indirection by allocating a pointer to point to the condvar location; this used to be useful.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the location of a new condvar or <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> on OOM </dd></dl>
<p>Definition at line <a class="el" href="dbus-threads_8c_source.html#l00199">199</a> of file <a class="el" href="dbus-threads_8c_source.html">dbus-threads.c</a>.</p>
<p>References <a class="el" href="dbus-threads_8c_source.html#l00181">_dbus_condvar_new()</a>, and <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.</p>
<p>Referenced by <a class="el" href="dbus-connection_8c_source.html#l01249">_dbus_connection_new_for_transport()</a>.</p>
</div>
</div>
<a class="anchor" id="ga6938b8a4547ce48290615990f64bd3bb"></a><!-- doxytag: member="dbus-threads.c::_dbus_condvar_wait" ref="ga6938b8a4547ce48290615990f64bd3bb" args="(DBusCondVar *cond, DBusCMutex *mutex)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__DBusThreadsInternals.html#ga6938b8a4547ce48290615990f64bd3bb">_dbus_condvar_wait</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusCondVar.html">DBusCondVar</a> * </td>
<td class="paramname"><em>cond</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structDBusCMutex.html">DBusCMutex</a> * </td>
<td class="paramname"><em>mutex</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Atomically unlocks the mutex and waits for the conditions variable to be signalled. </p>
<p>Locks the mutex again before returning. Does nothing if passed a <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> pointer. </p>
<p>Definition at line <a class="el" href="dbus-threads_8c_source.html#l00240">240</a> of file <a class="el" href="dbus-threads_8c_source.html">dbus-threads.c</a>.</p>
<p>References <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.</p>
</div>
</div>
<a class="anchor" id="ga918e53c2abc48ff496f3c75566ba8bd3"></a><!-- doxytag: member="dbus-threads.c::_dbus_condvar_wait_timeout" ref="ga918e53c2abc48ff496f3c75566ba8bd3" args="(DBusCondVar *cond, DBusCMutex *mutex, int timeout_milliseconds)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> <a class="el" href="group__DBusThreadsInternals.html#ga918e53c2abc48ff496f3c75566ba8bd3">_dbus_condvar_wait_timeout</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusCondVar.html">DBusCondVar</a> * </td>
<td class="paramname"><em>cond</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structDBusCMutex.html">DBusCMutex</a> * </td>
<td class="paramname"><em>mutex</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>timeout_milliseconds</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Atomically unlocks the mutex and waits for the conditions variable to be signalled, or for a timeout. </p>
<p>Locks the mutex again before returning. Does nothing if passed a <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> pointer. Return value is <a class="el" href="group__DBusMacros.html#gaa93f0eb578d23995850d61f7d61c55c1" title="Expands to "0".">FALSE</a> if we timed out, <a class="el" href="group__DBusMacros.html#gaa8cecfc5c5c054d2875c03e77b7be15d" title="Expands to "1".">TRUE</a> otherwise.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">cond</td><td>the condition variable </td></tr>
<tr><td class="paramname">mutex</td><td>the mutex </td></tr>
<tr><td class="paramname">timeout_milliseconds</td><td>the maximum time to wait </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__DBusMacros.html#gaa93f0eb578d23995850d61f7d61c55c1" title="Expands to "0".">FALSE</a> if the timeout occurred, <a class="el" href="group__DBusMacros.html#gaa8cecfc5c5c054d2875c03e77b7be15d" title="Expands to "1".">TRUE</a> if not </dd></dl>
<p>Definition at line <a class="el" href="dbus-threads_8c_source.html#l00261">261</a> of file <a class="el" href="dbus-threads_8c_source.html">dbus-threads.c</a>.</p>
<p>References <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="group__DBusMacros.html#gaa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>.</p>
</div>
</div>
<a class="anchor" id="ga8af2fd84773022e7e7ce1f21f0126203"></a><!-- doxytag: member="dbus-threads.c::_dbus_condvar_wake_one" ref="ga8af2fd84773022e7e7ce1f21f0126203" args="(DBusCondVar *cond)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__DBusThreadsInternals.html#ga8af2fd84773022e7e7ce1f21f0126203">_dbus_condvar_wake_one</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusCondVar.html">DBusCondVar</a> * </td>
<td class="paramname"><em>cond</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>If there are threads waiting on the condition variable, wake up exactly one. </p>
<p>Does nothing if passed a <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> pointer. </p>
<p>Definition at line <a class="el" href="dbus-threads_8c_source.html#l00278">278</a> of file <a class="el" href="dbus-threads_8c_source.html">dbus-threads.c</a>.</p>
<p>References <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.</p>
</div>
</div>
<a class="anchor" id="gaeb20c411a096aaf067918eb574f121d5"></a><!-- doxytag: member="dbus-threads.c::_dbus_rmutex_lock" ref="gaeb20c411a096aaf067918eb574f121d5" args="(DBusRMutex *mutex)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__DBusThreadsInternals.html#gaeb20c411a096aaf067918eb574f121d5">_dbus_rmutex_lock</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusRMutex.html">DBusRMutex</a> * </td>
<td class="paramname"><em>mutex</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Locks a mutex. </p>
<p>Does nothing if passed a <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> pointer. Locks may be recursive if threading implementation initialized recursive locks. </p>
<p>Definition at line <a class="el" href="dbus-threads_8c_source.html#l00122">122</a> of file <a class="el" href="dbus-threads_8c_source.html">dbus-threads.c</a>.</p>
<p>References <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.</p>
<p>Referenced by <a class="el" href="dbus-resources_8c_source.html#l00167">_dbus_counter_adjust_size()</a>, <a class="el" href="dbus-resources_8c_source.html#l00236">_dbus_counter_adjust_unix_fd()</a>, <a class="el" href="dbus-resources_8c_source.html#l00207">_dbus_counter_notify()</a>, <a class="el" href="dbus-resources_8c_source.html#l00116">_dbus_counter_ref()</a>, <a class="el" href="dbus-resources_8c_source.html#l00303">_dbus_counter_set_notify()</a>, and <a class="el" href="dbus-resources_8c_source.html#l00136">_dbus_counter_unref()</a>.</p>
</div>
</div>
<a class="anchor" id="ga191deedb97c76fae82bdbc8e1559a849"></a><!-- doxytag: member="dbus-threads.c::_dbus_rmutex_new_at_location" ref="ga191deedb97c76fae82bdbc8e1559a849" args="(DBusRMutex **location_p)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__DBusThreadsInternals.html#ga191deedb97c76fae82bdbc8e1559a849">_dbus_rmutex_new_at_location</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusRMutex.html">DBusRMutex</a> ** </td>
<td class="paramname"><em>location_p</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a new mutex or creates a no-op mutex if threads are not initialized. </p>
<p>May return <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> even if threads are initialized, indicating out-of-memory.</p>
<p>If possible, the mutex returned by this function is recursive, to avoid deadlocks. However, that cannot be relied on.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">location_p</td><td>the location of the new mutex, can return <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> on OOM </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="dbus-threads_8c_source.html#l00053">53</a> of file <a class="el" href="dbus-threads_8c_source.html">dbus-threads.c</a>.</p>
<p>References <a class="el" href="dbus-threads_8c_source.html#l00438">dbus_threads_init_default()</a>, and <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.</p>
<p>Referenced by <a class="el" href="dbus-connection_8c_source.html#l01249">_dbus_connection_new_for_transport()</a>, <a class="el" href="dbus-resources_8c_source.html#l00089">_dbus_counter_new()</a>, and <a class="el" href="dbus-server_8c_source.html#l00111">_dbus_server_init_base()</a>.</p>
</div>
</div>
<a class="anchor" id="ga5946b9a5ea3e12a81a798b575b45c62f"></a><!-- doxytag: member="dbus-threads.c::_dbus_rmutex_unlock" ref="ga5946b9a5ea3e12a81a798b575b45c62f" args="(DBusRMutex *mutex)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__DBusThreadsInternals.html#ga5946b9a5ea3e12a81a798b575b45c62f">_dbus_rmutex_unlock</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusRMutex.html">DBusRMutex</a> * </td>
<td class="paramname"><em>mutex</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Unlocks a mutex. </p>
<p>Does nothing if passed a <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> pointer.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__DBusMacros.html#gaa8cecfc5c5c054d2875c03e77b7be15d" title="Expands to "1".">TRUE</a> on success </dd></dl>
<p>Definition at line <a class="el" href="dbus-threads_8c_source.html#l00150">150</a> of file <a class="el" href="dbus-threads_8c_source.html">dbus-threads.c</a>.</p>
<p>References <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.</p>
<p>Referenced by <a class="el" href="dbus-connection_8c_source.html#l00399">_dbus_connection_unlock()</a>, <a class="el" href="dbus-resources_8c_source.html#l00167">_dbus_counter_adjust_size()</a>, <a class="el" href="dbus-resources_8c_source.html#l00236">_dbus_counter_adjust_unix_fd()</a>, <a class="el" href="dbus-resources_8c_source.html#l00207">_dbus_counter_notify()</a>, <a class="el" href="dbus-resources_8c_source.html#l00116">_dbus_counter_ref()</a>, <a class="el" href="dbus-resources_8c_source.html#l00303">_dbus_counter_set_notify()</a>, and <a class="el" href="dbus-resources_8c_source.html#l00136">_dbus_counter_unref()</a>.</p>
</div>
</div>
</div><!-- contents -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Mar 3 2016 17:50:34 for D-Bus by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>
</body>
</html>