tinyusb/0.4/group___group___func_attr.html
2014-03-27 17:27:26 +07:00

132 lines
13 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.6"/>
<title>tinyusb: Function Attributes</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="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</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 style="padding-left: 0.5em;">
<div id="projectname">tinyusb
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<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="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</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">
$(document).ready(function(){initNavTree('group___group___func_attr.html','');});
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#define-members">Macros</a> </div>
<div class="headertitle">
<div class="title">Function Attributes<div class="ingroups"><a class="el" href="group___group___g_c_c.html">GNU GCC</a></div></div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga18a61fcb06b815274b12b7f626993ac6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga18a61fcb06b815274b12b7f626993ac6"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___group___func_attr.html#ga18a61fcb06b815274b12b7f626993ac6">ATTR_ALWAYS_INLINE</a>&#160;&#160;&#160;__attribute__ ((always_inline))</td></tr>
<tr class="memdesc:ga18a61fcb06b815274b12b7f626993ac6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generally, functions are not inlined unless optimization is specified. For functions declared inline, this attribute inlines the function even if no optimization level is specified. <br/></td></tr>
<tr class="separator:ga18a61fcb06b815274b12b7f626993ac6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga47a06d21522822ff8bc4d85f8570b648"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga47a06d21522822ff8bc4d85f8570b648"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___group___func_attr.html#ga47a06d21522822ff8bc4d85f8570b648">ATTR_NON_NULL</a>&#160;&#160;&#160;__attribute__ ((nonull))</td></tr>
<tr class="memdesc:ga47a06d21522822ff8bc4d85f8570b648"><td class="mdescLeft">&#160;</td><td class="mdescRight">The nonnull attribute specifies that some function parameters should be non-null pointers. f the compiler determines that a null pointer is passed in an argument slot marked as non-null, and the -Wnonnull option is enabled, a warning is issued. All pointer arguments are marked as non-null. <br/></td></tr>
<tr class="separator:ga47a06d21522822ff8bc4d85f8570b648"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga477faefde32bfd89d5b5b40d70b1a998"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga477faefde32bfd89d5b5b40d70b1a998"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___group___func_attr.html#ga477faefde32bfd89d5b5b40d70b1a998">ATTR_PURE</a>&#160;&#160;&#160;__attribute__ ((pure))</td></tr>
<tr class="memdesc:ga477faefde32bfd89d5b5b40d70b1a998"><td class="mdescLeft">&#160;</td><td class="mdescRight">Many functions have no effects except the return value and their return value depends only on the parameters and/or global variables. Such a function can be subject to common subexpression elimination and loop optimization just as an arithmetic operator would be. These functions should be declared with the attribute pure. <br/></td></tr>
<tr class="separator:ga477faefde32bfd89d5b5b40d70b1a998"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa3a9548137fc3ca0ad1367d204891bd9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa3a9548137fc3ca0ad1367d204891bd9"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___group___func_attr.html#gaa3a9548137fc3ca0ad1367d204891bd9">ATTR_CONST</a>&#160;&#160;&#160;__attribute__ ((const))</td></tr>
<tr class="memdesc:gaa3a9548137fc3ca0ad1367d204891bd9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Many functions do not examine any values except their arguments, and have no effects except the return value. Basically this is just slightly more strict class than the pure attribute below, since function is not allowed to read global memory. Note that a function that has pointer arguments and examines the data pointed to must not be declared const. Likewise, a function that calls a non-const function usually must not be const. It does not make sense for a const function to return void. <br/></td></tr>
<tr class="separator:gaa3a9548137fc3ca0ad1367d204891bd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa120f4d35b3409a3c78353e7a10d671c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa120f4d35b3409a3c78353e7a10d671c"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___group___func_attr.html#gaa120f4d35b3409a3c78353e7a10d671c">ATTR_DEPRECATED</a>&#160;&#160;&#160;__attribute__ ((deprecated))</td></tr>
<tr class="memdesc:gaa120f4d35b3409a3c78353e7a10d671c"><td class="mdescLeft">&#160;</td><td class="mdescRight">The deprecated attribute results in a warning if the function is used anywhere in the source file. This is useful when identifying functions that are expected to be removed in a future version of a program. The warning also includes the location of the declaration of the deprecated function, to enable users to easily find further information about why the function is deprecated, or what they should do instead. Note that the warnings only occurs for uses. <br/></td></tr>
<tr class="separator:gaa120f4d35b3409a3c78353e7a10d671c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1d0fcdbdd450e9ac67f6fe773f77739b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga1d0fcdbdd450e9ac67f6fe773f77739b"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___group___func_attr.html#ga1d0fcdbdd450e9ac67f6fe773f77739b">ATTR_DEPRECATED_MESS</a>(mess)&#160;&#160;&#160;__attribute__ ((deprecated(mess)))</td></tr>
<tr class="memdesc:ga1d0fcdbdd450e9ac67f6fe773f77739b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Same as the deprecated attribute with optional message in the warning. <br/></td></tr>
<tr class="separator:ga1d0fcdbdd450e9ac67f6fe773f77739b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae4043b1626e70fabe467ba912b7596aa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae4043b1626e70fabe467ba912b7596aa"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___group___func_attr.html#gae4043b1626e70fabe467ba912b7596aa">ATTR_WEAK</a>&#160;&#160;&#160;__attribute__ ((weak))</td></tr>
<tr class="memdesc:gae4043b1626e70fabe467ba912b7596aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">The weak attribute causes the declaration to be emitted as a weak symbol rather than a global. This is primarily useful in defining library functions that can be overridden in user code. <br/></td></tr>
<tr class="separator:gae4043b1626e70fabe467ba912b7596aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5edf480c6eec3389a633f936f197a25c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga5edf480c6eec3389a633f936f197a25c"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___group___func_attr.html#ga5edf480c6eec3389a633f936f197a25c">ATTR_ALIAS</a>(func)&#160;&#160;&#160;__attribute__ ((alias(#func)))</td></tr>
<tr class="memdesc:ga5edf480c6eec3389a633f936f197a25c"><td class="mdescLeft">&#160;</td><td class="mdescRight">The alias attribute causes the declaration to be emitted as an alias for another symbol, which must be specified. <br/></td></tr>
<tr class="separator:ga5edf480c6eec3389a633f936f197a25c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadbbf99e4ab2704ac529aed0aca40707f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gadbbf99e4ab2704ac529aed0aca40707f"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___group___func_attr.html#gadbbf99e4ab2704ac529aed0aca40707f">ATTR_WEAKREF</a>(func)&#160;&#160;&#160;__attribute__ ((weakref(#func)))</td></tr>
<tr class="memdesc:gadbbf99e4ab2704ac529aed0aca40707f"><td class="mdescLeft">&#160;</td><td class="mdescRight">The weakref attribute marks a declaration as a weak reference. It is equivalent with weak + alias attribute, but require function is static. <br/></td></tr>
<tr class="separator:gadbbf99e4ab2704ac529aed0aca40707f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa61f3d1a169c3d97d95072b1ee6493fd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa61f3d1a169c3d97d95072b1ee6493fd"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___group___func_attr.html#gaa61f3d1a169c3d97d95072b1ee6493fd">ATTR_WARN_UNUSED_RESULT</a>&#160;&#160;&#160;__attribute__ ((warn_unused_result))</td></tr>
<tr class="memdesc:gaa61f3d1a169c3d97d95072b1ee6493fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">The warn_unused_result attribute causes a warning to be emitted if a caller of the function with this attribute does not use its return value. This is useful for functions where not checking the result is either a security problem or always a bug. <br/></td></tr>
<tr class="separator:gaa61f3d1a169c3d97d95072b1ee6493fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf271177a141ef77c04e5f3b219b4b6c3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf271177a141ef77c04e5f3b219b4b6c3"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___group___func_attr.html#gaf271177a141ef77c04e5f3b219b4b6c3">ATTR_USED</a>&#160;&#160;&#160;__attribute__ ((used))</td></tr>
<tr class="memdesc:gaf271177a141ef77c04e5f3b219b4b6c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">This attribute, attached to a function, means that code must be emitted for the function even if it appears that the function is not referenced. This is useful, for example, when the function is referenced only in inline assembly. <br/></td></tr>
<tr class="separator:gaf271177a141ef77c04e5f3b219b4b6c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa57f5a5d32c26ebb0e15d0e2bfdcd676"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa57f5a5d32c26ebb0e15d0e2bfdcd676"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___group___func_attr.html#gaa57f5a5d32c26ebb0e15d0e2bfdcd676">ATTR_UNUSED</a>&#160;&#160;&#160;__attribute__ ((unused))</td></tr>
<tr class="memdesc:gaa57f5a5d32c26ebb0e15d0e2bfdcd676"><td class="mdescLeft">&#160;</td><td class="mdescRight">This attribute, attached to a function, means that the function is meant to be possibly unused. GCC does not produce a warning for this function. <br/></td></tr>
<tr class="separator:gaa57f5a5d32c26ebb0e15d0e2bfdcd676"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated on Wed Mar 26 2014 16:23:18 for tinyusb by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
</ul>
</div>
</body>
</html>