/usr/share/doc/dbus/api/structDBusThreadFunctions.html is in dbus-1-doc 1.4.18-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | <!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: DBusThreadFunctions Struct Reference</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.4.18</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 class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="functions.html"><span>Data Fields</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-attribs">Data Fields</a> </div>
<div class="headertitle">
<div class="title">DBusThreadFunctions Struct Reference<div class="ingroups"><a class="el" href="group__DBusThreads.html">Thread functions</a></div></div> </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="DBusThreadFunctions" -->
<p>Functions that must be implemented to make the D-Bus library thread-aware.
<a href="structDBusThreadFunctions.html#details">More...</a></p>
<p><code>#include <<a class="el" href="dbus-threads_8h_source.html">dbus-threads.h</a>></code></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusThreadFunctions.html#a8f1c2a3b3805e2c4034d7a341f7f82f1">mask</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Mask indicating which functions are present. <a href="#a8f1c2a3b3805e2c4034d7a341f7f82f1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__DBusThreads.html#gae4cd138019719921ee81d7f3af2f0299">DBusMutexNewFunction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusThreadFunctions.html#a342ba12a619162a5b228903076b46a44">mutex_new</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Function to create a mutex; optional and deprecated. <a href="#a342ba12a619162a5b228903076b46a44"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__DBusThreads.html#ga571a95a8897fdf1cc80f36710f95efe7">DBusMutexFreeFunction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusThreadFunctions.html#a01107266a74895f13af9962af6ad07dd">mutex_free</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Function to free a mutex; optional and deprecated. <a href="#a01107266a74895f13af9962af6ad07dd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__DBusThreads.html#ga5ff3bc4d16295140d831c5f1a52f74aa">DBusMutexLockFunction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusThreadFunctions.html#a1cc9d20f2ad0296e932951470063f8d0">mutex_lock</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Function to lock a mutex; optional and deprecated. <a href="#a1cc9d20f2ad0296e932951470063f8d0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__DBusThreads.html#ga5568e0cd30e1872705d582e27c22e57f">DBusMutexUnlockFunction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusThreadFunctions.html#a334d478ec305b04f526537c131cd8e8a">mutex_unlock</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Function to unlock a mutex; optional and deprecated. <a href="#a334d478ec305b04f526537c131cd8e8a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1796b617165734984bc40d38f9600d78"></a><!-- doxytag: member="DBusThreadFunctions::condvar_new" ref="a1796b617165734984bc40d38f9600d78" args="" -->
<a class="el" href="group__DBusThreads.html#ga8187aee4a3803e6b3859bf0054b32004">DBusCondVarNewFunction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusThreadFunctions.html#a1796b617165734984bc40d38f9600d78">condvar_new</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Function to create a condition variable. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad302412c382190eddc05736f24d8855c"></a><!-- doxytag: member="DBusThreadFunctions::condvar_free" ref="ad302412c382190eddc05736f24d8855c" args="" -->
<a class="el" href="group__DBusThreads.html#gae65cc291c8c22bc2db83d6b72e41406c">DBusCondVarFreeFunction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusThreadFunctions.html#ad302412c382190eddc05736f24d8855c">condvar_free</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Function to free a condition variable. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae4cb6e9fe7c0813213561150721f349c"></a><!-- doxytag: member="DBusThreadFunctions::condvar_wait" ref="ae4cb6e9fe7c0813213561150721f349c" args="" -->
<a class="el" href="group__DBusThreads.html#gac27ac55dc1ef5cd28d14ab6edf9e02fb">DBusCondVarWaitFunction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusThreadFunctions.html#ae4cb6e9fe7c0813213561150721f349c">condvar_wait</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Function to wait on a condition. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5e049c7bdf4d83a85ebce31d838d4218"></a><!-- doxytag: member="DBusThreadFunctions::condvar_wait_timeout" ref="a5e049c7bdf4d83a85ebce31d838d4218" args="" -->
<a class="el" href="group__DBusThreads.html#ga33c3b5d908d32e6262c8c5dc269e1f8b">DBusCondVarWaitTimeoutFunction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusThreadFunctions.html#a5e049c7bdf4d83a85ebce31d838d4218">condvar_wait_timeout</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Function to wait on a condition with a timeout. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3f1301eacf666381ec6c39100e6787e1"></a><!-- doxytag: member="DBusThreadFunctions::condvar_wake_one" ref="a3f1301eacf666381ec6c39100e6787e1" args="" -->
<a class="el" href="group__DBusThreads.html#ga1035883699fd580d9eeeaf8355dfd733">DBusCondVarWakeOneFunction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusThreadFunctions.html#a3f1301eacf666381ec6c39100e6787e1">condvar_wake_one</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Function to wake one thread waiting on the condition. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a128295c0019a401163d04ea0e291b36c"></a><!-- doxytag: member="DBusThreadFunctions::condvar_wake_all" ref="a128295c0019a401163d04ea0e291b36c" args="" -->
<a class="el" href="group__DBusThreads.html#ga28d3cc22cb2374ae0e1c56df41632853">DBusCondVarWakeAllFunction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusThreadFunctions.html#a128295c0019a401163d04ea0e291b36c">condvar_wake_all</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Function to wake all threads waiting on the condition. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afd30fb78a3ca1064bc8c074a6a61361e"></a><!-- doxytag: member="DBusThreadFunctions::recursive_mutex_new" ref="afd30fb78a3ca1064bc8c074a6a61361e" args="" -->
<a class="el" href="group__DBusThreads.html#ga08fc7d346a564450730cc52035959681">DBusRecursiveMutexNewFunction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusThreadFunctions.html#afd30fb78a3ca1064bc8c074a6a61361e">recursive_mutex_new</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Function to create a recursive mutex. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8be6d85b7f162352efa5bb4a5663f44f"></a><!-- doxytag: member="DBusThreadFunctions::recursive_mutex_free" ref="a8be6d85b7f162352efa5bb4a5663f44f" args="" -->
<a class="el" href="group__DBusThreads.html#ga1709b60b7643b272a1c06a4270213a91">DBusRecursiveMutexFreeFunction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusThreadFunctions.html#a8be6d85b7f162352efa5bb4a5663f44f">recursive_mutex_free</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Function to free a recursive mutex. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae99179276be65fe4f701de307882dac5"></a><!-- doxytag: member="DBusThreadFunctions::recursive_mutex_lock" ref="ae99179276be65fe4f701de307882dac5" args="" -->
<a class="el" href="group__DBusThreads.html#ga08e197c1f992c7b91fe5541e4e36394c">DBusRecursiveMutexLockFunction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusThreadFunctions.html#ae99179276be65fe4f701de307882dac5">recursive_mutex_lock</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Function to lock a recursive mutex. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0bdb8cd9b263bcde5a0548b16ccd0702"></a><!-- doxytag: member="DBusThreadFunctions::recursive_mutex_unlock" ref="a0bdb8cd9b263bcde5a0548b16ccd0702" args="" -->
<a class="el" href="group__DBusThreads.html#gae12cbb69548ed6211a382962bcef12bf">DBusRecursiveMutexUnlockFunction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusThreadFunctions.html#a0bdb8cd9b263bcde5a0548b16ccd0702">recursive_mutex_unlock</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Function to unlock a recursive mutex. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab47695687270635c0a1d4bb9b2b1a3b1"></a><!-- doxytag: member="DBusThreadFunctions::padding1" ref="ab47695687270635c0a1d4bb9b2b1a3b1" args=")(void)" -->
void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusThreadFunctions.html#ab47695687270635c0a1d4bb9b2b1a3b1">padding1</a> )(void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Reserved for future expansion. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a49ca2f4d3718c2f0ad4d6172471d28f0"></a><!-- doxytag: member="DBusThreadFunctions::padding2" ref="a49ca2f4d3718c2f0ad4d6172471d28f0" args=")(void)" -->
void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusThreadFunctions.html#a49ca2f4d3718c2f0ad4d6172471d28f0">padding2</a> )(void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Reserved for future expansion. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adabe94ac211fbaedac44d570eb6b17b0"></a><!-- doxytag: member="DBusThreadFunctions::padding3" ref="adabe94ac211fbaedac44d570eb6b17b0" args=")(void)" -->
void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusThreadFunctions.html#adabe94ac211fbaedac44d570eb6b17b0">padding3</a> )(void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Reserved for future expansion. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aae49b987ac7d9466fba61cf1fa8f341d"></a><!-- doxytag: member="DBusThreadFunctions::padding4" ref="aae49b987ac7d9466fba61cf1fa8f341d" args=")(void)" -->
void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusThreadFunctions.html#aae49b987ac7d9466fba61cf1fa8f341d">padding4</a> )(void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Reserved for future expansion. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Functions that must be implemented to make the D-Bus library thread-aware. </p>
<p>The recursive mutex functions should be specified rather than the old, deprecated nonrecursive ones.</p>
<p>The condition variable functions have to work with recursive mutexes if you provide those, or with nonrecursive mutexes if you provide those.</p>
<p>If implementing threads using pthreads, be aware that PTHREAD_MUTEX_RECURSIVE is broken in combination with condition variables. libdbus relies on the Java-style behavior that when waiting on a condition, the recursion count is saved and restored, and the mutex is completely unlocked, not just decremented one level of recursion.</p>
<p>Thus with pthreads you probably have to roll your own emulated recursive mutexes, you can't use PTHREAD_MUTEX_RECURSIVE. This is what <a class="el" href="group__DBusThreads.html#ga33b6cf3b8f1e41bad5508f84758818a7" title="Calls dbus_threads_init() with a default set of DBusThreadFunctions appropriate for the platform...">dbus_threads_init_default()</a> does on platforms that use pthreads. </p>
<p>Definition at line <a class="el" href="dbus-threads_8h_source.html#l00161">161</a> of file <a class="el" href="dbus-threads_8h_source.html">dbus-threads.h</a>.</p>
</div><hr/><h2>Field Documentation</h2>
<a class="anchor" id="a8f1c2a3b3805e2c4034d7a341f7f82f1"></a><!-- doxytag: member="DBusThreadFunctions::mask" ref="a8f1c2a3b3805e2c4034d7a341f7f82f1" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int <a class="el" href="structDBusThreadFunctions.html#a8f1c2a3b3805e2c4034d7a341f7f82f1">DBusThreadFunctions::mask</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Mask indicating which functions are present. </p>
<p>Definition at line <a class="el" href="dbus-threads_8h_source.html#l00163">163</a> of file <a class="el" href="dbus-threads_8h_source.html">dbus-threads.h</a>.</p>
<p>Referenced by <a class="el" href="dbus-threads_8c_source.html#l00548">dbus_threads_init()</a>.</p>
</div>
</div>
<a class="anchor" id="a01107266a74895f13af9962af6ad07dd"></a><!-- doxytag: member="DBusThreadFunctions::mutex_free" ref="a01107266a74895f13af9962af6ad07dd" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__DBusThreads.html#ga571a95a8897fdf1cc80f36710f95efe7">DBusMutexFreeFunction</a> <a class="el" href="structDBusThreadFunctions.html#a01107266a74895f13af9962af6ad07dd">DBusThreadFunctions::mutex_free</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Function to free a mutex; optional and deprecated. </p>
<p>Definition at line <a class="el" href="dbus-threads_8h_source.html#l00166">166</a> of file <a class="el" href="dbus-threads_8h_source.html">dbus-threads.h</a>.</p>
<p>Referenced by <a class="el" href="dbus-threads_8c_source.html#l00110">_dbus_mutex_free()</a>, and <a class="el" href="dbus-threads_8c_source.html#l00548">dbus_threads_init()</a>.</p>
</div>
</div>
<a class="anchor" id="a1cc9d20f2ad0296e932951470063f8d0"></a><!-- doxytag: member="DBusThreadFunctions::mutex_lock" ref="a1cc9d20f2ad0296e932951470063f8d0" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__DBusThreads.html#ga5ff3bc4d16295140d831c5f1a52f74aa">DBusMutexLockFunction</a> <a class="el" href="structDBusThreadFunctions.html#a1cc9d20f2ad0296e932951470063f8d0">DBusThreadFunctions::mutex_lock</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Function to lock a mutex; optional and deprecated. </p>
<p>Definition at line <a class="el" href="dbus-threads_8h_source.html#l00167">167</a> of file <a class="el" href="dbus-threads_8h_source.html">dbus-threads.h</a>.</p>
<p>Referenced by <a class="el" href="dbus-threads_8c_source.html#l00144">_dbus_mutex_lock()</a>, and <a class="el" href="dbus-threads_8c_source.html#l00548">dbus_threads_init()</a>.</p>
</div>
</div>
<a class="anchor" id="a342ba12a619162a5b228903076b46a44"></a><!-- doxytag: member="DBusThreadFunctions::mutex_new" ref="a342ba12a619162a5b228903076b46a44" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__DBusThreads.html#gae4cd138019719921ee81d7f3af2f0299">DBusMutexNewFunction</a> <a class="el" href="structDBusThreadFunctions.html#a342ba12a619162a5b228903076b46a44">DBusThreadFunctions::mutex_new</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Function to create a mutex; optional and deprecated. </p>
<p>Definition at line <a class="el" href="dbus-threads_8h_source.html#l00165">165</a> of file <a class="el" href="dbus-threads_8h_source.html">dbus-threads.h</a>.</p>
<p>Referenced by <a class="el" href="dbus-threads_8c_source.html#l00069">_dbus_mutex_new()</a>, and <a class="el" href="dbus-threads_8c_source.html#l00548">dbus_threads_init()</a>.</p>
</div>
</div>
<a class="anchor" id="a334d478ec305b04f526537c131cd8e8a"></a><!-- doxytag: member="DBusThreadFunctions::mutex_unlock" ref="a334d478ec305b04f526537c131cd8e8a" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__DBusThreads.html#ga5568e0cd30e1872705d582e27c22e57f">DBusMutexUnlockFunction</a> <a class="el" href="structDBusThreadFunctions.html#a334d478ec305b04f526537c131cd8e8a">DBusThreadFunctions::mutex_unlock</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Function to unlock a mutex; optional and deprecated. </p>
<p>Definition at line <a class="el" href="dbus-threads_8h_source.html#l00168">168</a> of file <a class="el" href="dbus-threads_8h_source.html">dbus-threads.h</a>.</p>
<p>Referenced by <a class="el" href="dbus-threads_8c_source.html#l00161">_dbus_mutex_unlock()</a>, and <a class="el" href="dbus-threads_8c_source.html#l00548">dbus_threads_init()</a>.</p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="dbus-threads_8h_source.html">dbus-threads.h</a></li>
</ul>
</div><!-- contents -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Feb 22 2012 08:44:53 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>
|