mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 17:56:16 +00:00
107 lines
14 KiB
HTML
107 lines
14 KiB
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"/>
|
|
<meta name="generator" content="Doxygen 1.8.14"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>Dash Core: src/threadsafety.h Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(document).ready(initResizable);
|
|
/* @license-end */</script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectlogo"><img alt="Logo" src="bitcoin_logo_doxygen.png"/></td>
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">Dash Core
|
|
 <span id="projectnumber">0.12.2.1</span>
|
|
</div>
|
|
<div id="projectbrief">P2P Digital Currency</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.14 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(document).ready(function(){initNavTree('threadsafety_8h_source.html','');});
|
|
/* @license-end */
|
|
</script>
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">threadsafety.h</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="threadsafety_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">// Copyright (c) 2009-2010 Satoshi Nakamoto</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// Copyright (c) 2009-2012 The Bitcoin Core developers</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// Distributed under the MIT software license, see the accompanying</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">// file COPYING or http://www.opensource.org/licenses/mit-license.php.</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> </div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="preprocessor">#ifndef BITCOIN_THREADSAFETY_H</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="preprocessor">#define BITCOIN_THREADSAFETY_H</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> </div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor">#ifdef __clang__</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">// TL;DR Add GUARDED_BY(mutex) to member variables. The others are</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// rarely necessary. Ex: int nFoo GUARDED_BY(cs_foo);</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment">//</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment">// See http://clang.llvm.org/docs/LanguageExtensions.html#threadsafety</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">// for documentation. The clang compiler can do advanced static analysis</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment">// of locking when given the -Wthread-safety option.</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#define LOCKABLE __attribute__((lockable))</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#define SCOPED_LOCKABLE __attribute__((scoped_lockable))</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#define GUARDED_BY(x) __attribute__((guarded_by(x)))</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#define GUARDED_VAR __attribute__((guarded_var))</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#define PT_GUARDED_BY(x) __attribute__((pt_guarded_by(x)))</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#define PT_GUARDED_VAR __attribute__((pt_guarded_var))</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#define ACQUIRED_AFTER(...) __attribute__((acquired_after(__VA_ARGS__)))</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#define ACQUIRED_BEFORE(...) __attribute__((acquired_before(__VA_ARGS__)))</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#define EXCLUSIVE_LOCK_FUNCTION(...) __attribute__((exclusive_lock_function(__VA_ARGS__)))</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#define SHARED_LOCK_FUNCTION(...) __attribute__((shared_lock_function(__VA_ARGS__)))</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#define EXCLUSIVE_TRYLOCK_FUNCTION(...) __attribute__((exclusive_trylock_function(__VA_ARGS__)))</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#define SHARED_TRYLOCK_FUNCTION(...) __attribute__((shared_trylock_function(__VA_ARGS__)))</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#define UNLOCK_FUNCTION(...) __attribute__((unlock_function(__VA_ARGS__)))</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#define LOCK_RETURNED(x) __attribute__((lock_returned(x)))</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#define LOCKS_EXCLUDED(...) __attribute__((locks_excluded(__VA_ARGS__)))</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#define EXCLUSIVE_LOCKS_REQUIRED(...) __attribute__((exclusive_locks_required(__VA_ARGS__)))</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#define SHARED_LOCKS_REQUIRED(...) __attribute__((shared_locks_required(__VA_ARGS__)))</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#define NO_THREAD_SAFETY_ANALYSIS __attribute__((no_thread_safety_analysis))</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#else</span></div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="threadsafety_8h.html#a9ce9440fc9b6862f43af10b70769f914"> 35</a></span> <span class="preprocessor">#define LOCKABLE</span></div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="threadsafety_8h.html#a954d07e5a857905a2f333504beacef0d"> 36</a></span> <span class="preprocessor">#define SCOPED_LOCKABLE</span></div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="threadsafety_8h.html#a4bc26ad7e8bc853ad3f58a8a343c952e"> 37</a></span> <span class="preprocessor">#define GUARDED_BY(x)</span></div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="threadsafety_8h.html#a9b3c6006c83ebe27f142f42b46ee4332"> 38</a></span> <span class="preprocessor">#define GUARDED_VAR</span></div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="threadsafety_8h.html#ac50ea92afc792eaa17777dc6009e31c0"> 39</a></span> <span class="preprocessor">#define PT_GUARDED_BY(x)</span></div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="threadsafety_8h.html#a99c54c862c542fd7ebd8d2fec7fb5e41"> 40</a></span> <span class="preprocessor">#define PT_GUARDED_VAR</span></div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="threadsafety_8h.html#a34e7a4489fb62749ebbfd249ac6c5544"> 41</a></span> <span class="preprocessor">#define ACQUIRED_AFTER(...)</span></div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="threadsafety_8h.html#aabfe9909811c29995cc731bd19a2d544"> 42</a></span> <span class="preprocessor">#define ACQUIRED_BEFORE(...)</span></div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="threadsafety_8h.html#a77729163b7f6867da40ad5daa5f926f3"> 43</a></span> <span class="preprocessor">#define EXCLUSIVE_LOCK_FUNCTION(...)</span></div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="threadsafety_8h.html#ae4b3dac87ecaa43e3150b794536bdbf1"> 44</a></span> <span class="preprocessor">#define SHARED_LOCK_FUNCTION(...)</span></div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="threadsafety_8h.html#a3c67d370ed1f55064d85e01076aad534"> 45</a></span> <span class="preprocessor">#define EXCLUSIVE_TRYLOCK_FUNCTION(...)</span></div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="threadsafety_8h.html#ac5742059d9119e1d6cec82e336341dd5"> 46</a></span> <span class="preprocessor">#define SHARED_TRYLOCK_FUNCTION(...)</span></div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="threadsafety_8h.html#abd56e19f9b4781b1a5212a46951cf5c3"> 47</a></span> <span class="preprocessor">#define UNLOCK_FUNCTION(...)</span></div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="threadsafety_8h.html#ab355c21df501f97a4a5e63a868373c4f"> 48</a></span> <span class="preprocessor">#define LOCK_RETURNED(x)</span></div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="threadsafety_8h.html#a6bb97382864d0bd2cd4dd5191bb03f6c"> 49</a></span> <span class="preprocessor">#define LOCKS_EXCLUDED(...)</span></div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="threadsafety_8h.html#a0e2e86b0f11d9778240b0a0b263047b1"> 50</a></span> <span class="preprocessor">#define EXCLUSIVE_LOCKS_REQUIRED(...)</span></div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="threadsafety_8h.html#a0ce030fe76250c8ed0eb53d8f1d29d33"> 51</a></span> <span class="preprocessor">#define SHARED_LOCKS_REQUIRED(...)</span></div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="threadsafety_8h.html#ab8ec653d80c013941ef73e4c80cd44cf"> 52</a></span> <span class="preprocessor">#define NO_THREAD_SAFETY_ANALYSIS</span></div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="preprocessor">#endif // __GNUC__</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="preprocessor">#endif // BITCOIN_THREADSAFETY_H</span></div></div><!-- fragment --></div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="threadsafety_8h.html">threadsafety.h</a></li>
|
|
<li class="footer">Generated on Thu Dec 14 2017 13:15:09 for Dash Core by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|