diff options
Diffstat (limited to 'runtime/docs/html/map_8c.html')
-rw-r--r-- | runtime/docs/html/map_8c.html | 1199 |
1 files changed, 1199 insertions, 0 deletions
diff --git a/runtime/docs/html/map_8c.html b/runtime/docs/html/map_8c.html new file mode 100644 index 00000000..d4982cac --- /dev/null +++ b/runtime/docs/html/map_8c.html @@ -0,0 +1,1199 @@ +<!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>SystemTap: SystemTap Runtime Library</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +</head><body> +<div class="qindex"><a class="qindex" href="index.html">Intro</a> | <a class="qindex" href="globals_func.html">Functions</a> | <a class="qindex" href="globals_defs.html">Defines</a> | <a class="qindex" href="globals_enum.html">Enumerations</a> | <a class="qindex" href="globals_eval.html">Enumeration Values</a></div> + +<!-- Generated by Doxygen 1.3.9.1 --> +<h1>map.c File Reference</h1> +<p> +<a href="map_8c-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"> +<tr><td></td></tr> +<tr><td colspan="2"><br><h2>Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structmap__root.html">MAP</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a3">_stp_map_new</a> (unsigned max_entries, enum <a class="el" href="map_8h.html#a19">valtype</a> type)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a new map. <a href="#a3"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a5">_stp_map_key_del</a> (<a class="el" href="structmap__root.html">MAP</a> map)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Deletes the current element. <a href="#a5"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structmap__node.html">map_node</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a6">_stp_map_start</a> (<a class="el" href="structmap__root.html">MAP</a> map)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the first element in a map. <a href="#a6"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structmap__node.html">map_node</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a7">_stp_map_iter</a> (<a class="el" href="structmap__root.html">MAP</a> map, struct <a class="el" href="structmap__node.html">map_node</a> *m)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the next element in a map. <a href="#a7"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a8">_stp_map_del</a> (<a class="el" href="structmap__root.html">MAP</a> map)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Deletes a map. <a href="#a8"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a9">_stp_map_key_long_long</a> (<a class="el" href="structmap__root.html">MAP</a> map, long key1, long key2)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the map's key to two longs. <a href="#a9"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a10">_stp_map_key_str_str</a> (<a class="el" href="structmap__root.html">MAP</a> map, char *key1, char *key2)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the map's key to two strings. <a href="#a10"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a11">_stp_map_key_str_long</a> (<a class="el" href="structmap__root.html">MAP</a> map, char *key1, long key2)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the map's key to a string and a long. <a href="#a11"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a12">_stp_map_key_long_str</a> (<a class="el" href="structmap__root.html">MAP</a> map, long key1, char *key2)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the map's key to a long and a string. <a href="#a12"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a13">_stp_map_key_str</a> (<a class="el" href="structmap__root.html">MAP</a> map, char *key)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the map's key to a string. <a href="#a13"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a14">_stp_map_key_long</a> (<a class="el" href="structmap__root.html">MAP</a> map, long key)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the map's key to a long. <a href="#a14"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a16">_stp_map_set_int64</a> (<a class="el" href="structmap__root.html">MAP</a> map, int64_t val)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the current element's value to an int64. <a href="#a16"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a17">_stp_map_get_int64</a> (<a class="el" href="structmap__root.html">MAP</a> map)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the current element's value. <a href="#a17"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a18">_stp_map_set_str</a> (<a class="el" href="structmap__root.html">MAP</a> map, char *val)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the current element's value to a string. <a href="#a18"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a19">_stp_map_get_str</a> (<a class="el" href="structmap__root.html">MAP</a> map)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the current element's value. <a href="#a19"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a20">_stp_map_set_stat</a> (<a class="el" href="structmap__root.html">MAP</a> map, <a class="el" href="structstat.html">stat</a> *stats)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the current element's value to a stat. <a href="#a20"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structstat.html">stat</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a21">_stp_map_get_stat</a> (<a class="el" href="structmap__root.html">MAP</a> map)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the current element's value. <a href="#a21"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a22">_stp_map_stat_add</a> (<a class="el" href="structmap__root.html">MAP</a> map, int64_t val)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Add to the current element's statistics. <a href="#a22"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structmap__root.html">MAP</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a23">_stp_list_new</a> (unsigned max_entries, enum <a class="el" href="map_8h.html#a19">valtype</a> type)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a new list. <a href="#a23"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a24">_stp_list_clear</a> (<a class="el" href="structmap__root.html">MAP</a> map)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Clears a list. <a href="#a24"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a25">_stp_list_add_str</a> (<a class="el" href="structmap__root.html">MAP</a> map, char *str)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a string to a list. <a href="#a25"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a26">_stp_list_add_int64</a> (<a class="el" href="structmap__root.html">MAP</a> map, int64_t val)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds an int64 to a list. <a href="#a26"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="map_8c.html#a27">_stp_list_size</a> (<a class="el" href="structmap__root.html">MAP</a> map)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the number of elements in a list. <a href="#a27"></a><br></td></tr> +</table> +<hr><h2>Function Documentation</h2> +<a class="anchor" name="a26" doxytag="map.c::_stp_list_add_int64"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top">void _stp_list_add_int64 </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="mdname" nowrap> <em>map</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td class="md"></td> + <td class="md" nowrap>int64_t </td> + <td class="mdname" nowrap> <em>val</em></td> + </tr> + <tr> + <td class="md"></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inline]</code></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Adds an int64 to a list. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>map</em> </td><td></td></tr> + <tr><td valign="top"></td><td valign="top"><em>val</em> </td><td></td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00816">816</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="map_8c-source.html#l00415">_stp_map_key_long()</a>, <a class="el" href="map_8c-source.html#l00471">_stp_map_set_int64()</a>, <a class="el" href="map_8h-source.html#l00084">MAP</a>, and <a class="el" href="map_8h-source.html#l00053">map_root::num</a>. </td> + </tr> +</table> +<a class="anchor" name="a25" doxytag="map.c::_stp_list_add_str"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top">void _stp_list_add_str </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="mdname" nowrap> <em>map</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td class="md"></td> + <td class="md" nowrap>char * </td> + <td class="mdname" nowrap> <em>str</em></td> + </tr> + <tr> + <td class="md"></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inline]</code></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Adds a string to a list. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>map</em> </td><td></td></tr> + <tr><td valign="top"></td><td valign="top"><em>str</em> </td><td></td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00805">805</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="map_8c-source.html#l00415">_stp_map_key_long()</a>, <a class="el" href="map_8c-source.html#l00548">_stp_map_set_str()</a>, <a class="el" href="map_8h-source.html#l00084">MAP</a>, and <a class="el" href="map_8h-source.html#l00053">map_root::num</a>. +<p> +Referenced by <a class="el" href="copy_8c-source.html#l00115">_stp_copy_argv_from_user()</a>. </td> + </tr> +</table> +<a class="anchor" name="a24" doxytag="map.c::_stp_list_clear"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top">void _stp_list_clear </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="mdname1" valign="top" nowrap> <em>map</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Clears a list. +<p> +All elements in the list are deleted. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>map</em> </td><td></td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00765">765</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="alloc_8h-source.html#l00057">_stp_free()</a>, <a class="el" href="io_8c-source.html#l00011">dlog()</a>, <a class="el" href="map_8h-source.html#l00059">map_root::head</a>, <a class="el" href="map_8h-source.html#l00022">map_node::hnode</a>, <a class="el" href="map_8h-source.html#l00021">map_node::lnode</a>, <a class="el" href="map_8h-source.html#l00084">MAP</a>, <a class="el" href="map_8h-source.html#l00050">map_root::maxnum</a>, <a class="el" href="map_8h-source.html#l00053">map_root::num</a>, and <a class="el" href="map_8h-source.html#l00063">map_root::pool</a>. </td> + </tr> +</table> +<a class="anchor" name="a23" doxytag="map.c::_stp_list_new"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> _stp_list_new </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">unsigned </td> + <td class="mdname" nowrap> <em>max_entries</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td class="md"></td> + <td class="md" nowrap>enum <a class="el" href="map_8h.html#a19">valtype</a> </td> + <td class="mdname" nowrap> <em>type</em></td> + </tr> + <tr> + <td class="md"></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Create a new list. +<p> +A list is a map that internally has an incrementing long key for each member. Lists do not wrap if elements are added to exceed their maximum size. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>max_entries</em> </td><td>The maximum number of entries allowed. Currently that number will be preallocated. If max_entries is 0, there will be no maximum and entries will be allocated dynamically. </td></tr> + <tr><td valign="top"></td><td valign="top"><em>type</em> </td><td>Type of values stored in this list. </td></tr> + </table> +</dl> +<dl compact><dt><b>Returns:</b></dt><dd>A MAP on success or NULL on failure. </dd></dl> +<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="map_8h.html#a8">foreach</a> </dd></dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00753">753</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="map_8c-source.html#l00043">_stp_map_new()</a>, <a class="el" href="map_8h-source.html#l00084">MAP</a>, and <a class="el" href="map_8h-source.html#l00056">map_root::no_wrap</a>. </td> + </tr> +</table> +<a class="anchor" name="a27" doxytag="map.c::_stp_list_size"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top">int _stp_list_size </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="mdname1" valign="top" nowrap> <em>map</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Get the number of elements in a list. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>map</em> </td><td></td></tr> + </table> +</dl> +<dl compact><dt><b>Returns:</b></dt><dd>The number of elements in a list. </dd></dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00827">827</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="map_8h-source.html#l00084">MAP</a>, and <a class="el" href="map_8h-source.html#l00053">map_root::num</a>. </td> + </tr> +</table> +<a class="anchor" name="a8" doxytag="map.c::_stp_map_del"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top">void _stp_map_del </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="mdname1" valign="top" nowrap> <em>map</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Deletes a map. +<p> +Deletes a map, freeing all memory in all elements. Normally done only when the module exits. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>map</em> </td><td></td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00190">190</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="alloc_8h-source.html#l00067">_stp_vfree()</a>, <a class="el" href="map_8h-source.html#l00059">map_root::head</a>, <a class="el" href="map_8h-source.html#l00021">map_node::lnode</a>, <a class="el" href="map_8h-source.html#l00084">MAP</a>, and <a class="el" href="map_8h-source.html#l00081">map_root::membuf</a>. </td> + </tr> +</table> +<a class="anchor" name="a17" doxytag="map.c::_stp_map_get_int64"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top">int64_t _stp_map_get_int64 </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="mdname1" valign="top" nowrap> <em>map</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Gets the current element's value. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>map</em> </td><td></td></tr> + </table> +</dl> +<dl compact><dt><b>Returns:</b></dt><dd>The value. If the current element is not set or doesn't exist, returns 0. </dd></dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00528">528</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="map_8h-source.html#l00070">map_root::create</a>, <a class="el" href="runtime_8h-source.html#l00017">dbug</a>, <a class="el" href="map_8h-source.html#l00066">map_root::key</a>, <a class="el" href="map_8h-source.html#l00084">MAP</a>, and <a class="el" href="map_8h-source.html#l00032">map_node_int64::val</a>. </td> + </tr> +</table> +<a class="anchor" name="a21" doxytag="map.c::_stp_map_get_stat"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"><a class="el" href="structstat.html">stat</a>* _stp_map_get_stat </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="mdname1" valign="top" nowrap> <em>map</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Gets the current element's value. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>map</em> </td><td></td></tr> + </table> +</dl> +<dl compact><dt><b>Returns:</b></dt><dd>A pointer to the stats struct. If the current element is not set or doesn't exist, returns NULL. </dd></dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00692">692</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="map_8h-source.html#l00070">map_root::create</a>, <a class="el" href="runtime_8h-source.html#l00017">dbug</a>, <a class="el" href="map_8h-source.html#l00066">map_root::key</a>, <a class="el" href="map_8h-source.html#l00084">MAP</a>, and <a class="el" href="map_8h-source.html#l00042">map_node_stat::stats</a>. </td> + </tr> +</table> +<a class="anchor" name="a19" doxytag="map.c::_stp_map_get_str"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top">char* _stp_map_get_str </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="mdname1" valign="top" nowrap> <em>map</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Gets the current element's value. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>map</em> </td><td></td></tr> + </table> +</dl> +<dl compact><dt><b>Returns:</b></dt><dd>A string pointer. If the current element is not set or doesn't exist, returns NULL. </dd></dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00609">609</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="map_8h-source.html#l00070">map_root::create</a>, <a class="el" href="runtime_8h-source.html#l00017">dbug</a>, <a class="el" href="map_8h-source.html#l00066">map_root::key</a>, <a class="el" href="map_8h-source.html#l00084">MAP</a>, and <a class="el" href="map_8h-source.html#l00037">map_node_str::str</a>. </td> + </tr> +</table> +<a class="anchor" name="a7" doxytag="map.c::_stp_map_iter"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top">struct <a class="el" href="structmap__node.html">map_node</a>* _stp_map_iter </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="mdname" nowrap> <em>map</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td class="md"></td> + <td class="md" nowrap>struct <a class="el" href="structmap__node.html">map_node</a> * </td> + <td class="mdname" nowrap> <em>m</em></td> + </tr> + <tr> + <td class="md"></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Get the next element in a map. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>map</em> </td><td></td></tr> + <tr><td valign="top"></td><td valign="top"><em>m</em> </td><td>a pointer to the current element, returned from <a class="el" href="map_8c.html#a6">_stp_map_start()</a> or <a class="el" href="map_8c.html#a7">_stp_map_iter()</a>. </td></tr> + </table> +</dl> +<dl compact><dt><b>Returns:</b></dt><dd>a pointer to the next element. This is typically used with <a class="el" href="map_8c.html#a6">_stp_map_start()</a>. See the <a class="el" href="map_8h.html#a8">foreach()</a> macro for typical usage. It probably does what you want anyway. </dd></dl> +<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="map_8h.html#a8">foreach</a> </dd></dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00172">172</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="runtime_8h-source.html#l00017">dbug</a>, <a class="el" href="map_8h-source.html#l00059">map_root::head</a>, <a class="el" href="map_8h-source.html#l00021">map_node::lnode</a>, and <a class="el" href="map_8h-source.html#l00084">MAP</a>. </td> + </tr> +</table> +<a class="anchor" name="a5" doxytag="map.c::_stp_map_key_del"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top">void _stp_map_key_del </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="mdname1" valign="top" nowrap> <em>map</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Deletes the current element. +<p> +If no current element (key) for this map is set, this function does nothing. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>map</em> </td><td></td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00104">104</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="alloc_8h-source.html#l00057">_stp_free()</a>, <a class="el" href="map_8h-source.html#l00070">map_root::create</a>, <a class="el" href="runtime_8h-source.html#l00017">dbug</a>, <a class="el" href="map_8h-source.html#l00022">map_node::hnode</a>, <a class="el" href="map_8h-source.html#l00066">map_root::key</a>, <a class="el" href="map_8h-source.html#l00021">map_node::lnode</a>, <a class="el" href="map_8h-source.html#l00084">MAP</a>, <a class="el" href="map_8h-source.html#l00050">map_root::maxnum</a>, <a class="el" href="map_8h-source.html#l00053">map_root::num</a>, and <a class="el" href="map_8h-source.html#l00063">map_root::pool</a>. +<p> +Referenced by <a class="el" href="map_8c-source.html#l00471">_stp_map_set_int64()</a>, <a class="el" href="map_8c-source.html#l00633">_stp_map_set_stat()</a>, and <a class="el" href="map_8c-source.html#l00548">_stp_map_set_str()</a>. </td> + </tr> +</table> +<a class="anchor" name="a14" doxytag="map.c::_stp_map_key_long"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top">void _stp_map_key_long </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="mdname" nowrap> <em>map</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td class="md"></td> + <td class="md" nowrap>long </td> + <td class="mdname" nowrap> <em>key</em></td> + </tr> + <tr> + <td class="md"></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Set the map's key to a long. +<p> +This sets the current element based on a long key. If the key is not found, a new element will not be created until a <em>_stp_map_set_xxx</em> call. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>map</em> </td><td></td></tr> + <tr><td valign="top"></td><td valign="top"><em>key</em> </td><td></td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00415">415</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="map_8c-source.html#l00218">_stp_map_key_long_long()</a>, and <a class="el" href="map_8h-source.html#l00084">MAP</a>. +<p> +Referenced by <a class="el" href="map_8c-source.html#l00816">_stp_list_add_int64()</a>, and <a class="el" href="map_8c-source.html#l00805">_stp_list_add_str()</a>. </td> + </tr> +</table> +<a class="anchor" name="a9" doxytag="map.c::_stp_map_key_long_long"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top">void _stp_map_key_long_long </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="mdname" nowrap> <em>map</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td class="md"></td> + <td class="md" nowrap>long </td> + <td class="mdname" nowrap> <em>key1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td class="md"></td> + <td class="md" nowrap>long </td> + <td class="mdname" nowrap> <em>key2</em></td> + </tr> + <tr> + <td class="md"></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Set the map's key to two longs. +<p> +This sets the current element based on a key of two strings. If the keys are not found, a new element will not be created until a <em>_stp_map_set_xxx</em> call. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>map</em> </td><td></td></tr> + <tr><td valign="top"></td><td valign="top"><em>key1</em> </td><td>first key </td></tr> + <tr><td valign="top"></td><td valign="top"><em>key2</em> </td><td>second key </td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00218">218</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="map_8h-source.html#l00074">map_root::c_key1</a>, <a class="el" href="map_8h-source.html#l00075">map_root::c_key2</a>, <a class="el" href="map_8h-source.html#l00073">map_root::c_keyhead</a>, <a class="el" href="map_8h-source.html#l00070">map_root::create</a>, <a class="el" href="runtime_8h-source.html#l00017">dbug</a>, <a class="el" href="map_8h-source.html#l00078">map_root::hashes</a>, <a class="el" href="map_8h-source.html#l00066">map_root::key</a>, <a class="el" href="map_8h-source.html#l00023">map_node::key1</a>, <a class="el" href="map_8h-source.html#l00084">MAP</a>, and <a class="el" href="map_8h-source.html#l00012">key_data::val</a>. +<p> +Referenced by <a class="el" href="map_8c-source.html#l00415">_stp_map_key_long()</a>. </td> + </tr> +</table> +<a class="anchor" name="a12" doxytag="map.c::_stp_map_key_long_str"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top">void _stp_map_key_long_str </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="mdname" nowrap> <em>map</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td class="md"></td> + <td class="md" nowrap>long </td> + <td class="mdname" nowrap> <em>key1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td class="md"></td> + <td class="md" nowrap>char * </td> + <td class="mdname" nowrap> <em>key2</em></td> + </tr> + <tr> + <td class="md"></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Set the map's key to a long and a string. +<p> +This sets the current element based on a key of a long and a string. If the keys are not found, a new element will not be created until a <em>_stp_map_set_xxx</em> call. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>map</em> </td><td></td></tr> + <tr><td valign="top"></td><td valign="top"><em>key1</em> </td><td>first key </td></tr> + <tr><td valign="top"></td><td valign="top"><em>key2</em> </td><td>second key </td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00358">358</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="map_8h-source.html#l00074">map_root::c_key1</a>, <a class="el" href="map_8h-source.html#l00075">map_root::c_key2</a>, <a class="el" href="map_8h-source.html#l00073">map_root::c_keyhead</a>, <a class="el" href="map_8h-source.html#l00070">map_root::create</a>, <a class="el" href="runtime_8h-source.html#l00017">dbug</a>, <a class="el" href="map_8h-source.html#l00078">map_root::hashes</a>, <a class="el" href="map_8h-source.html#l00066">map_root::key</a>, <a class="el" href="map_8h-source.html#l00023">map_node::key1</a>, <a class="el" href="map_8h-source.html#l00024">map_node::key2</a>, <a class="el" href="map_8h-source.html#l00084">MAP</a>, <a class="el" href="map_8h-source.html#l00013">key_data::str</a>, and <a class="el" href="map_8h-source.html#l00012">key_data::val</a>. </td> + </tr> +</table> +<a class="anchor" name="a13" doxytag="map.c::_stp_map_key_str"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top">void _stp_map_key_str </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="mdname" nowrap> <em>map</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td class="md"></td> + <td class="md" nowrap>char * </td> + <td class="mdname" nowrap> <em>key</em></td> + </tr> + <tr> + <td class="md"></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Set the map's key to a string. +<p> +This sets the current element based on a string key. If the key is not found, a new element will not be created until a <em>_stp_map_set_xxx</em> call. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>map</em> </td><td></td></tr> + <tr><td valign="top"></td><td valign="top"><em>key</em> </td><td></td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00399">399</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="map_8c-source.html#l00261">_stp_map_key_str_str()</a>, and <a class="el" href="map_8h-source.html#l00084">MAP</a>. </td> + </tr> +</table> +<a class="anchor" name="a11" doxytag="map.c::_stp_map_key_str_long"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top">void _stp_map_key_str_long </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="mdname" nowrap> <em>map</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td class="md"></td> + <td class="md" nowrap>char * </td> + <td class="mdname" nowrap> <em>key1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td class="md"></td> + <td class="md" nowrap>long </td> + <td class="mdname" nowrap> <em>key2</em></td> + </tr> + <tr> + <td class="md"></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Set the map's key to a string and a long. +<p> +This sets the current element based on a key of a string and a long. If the keys are not found, a new element will not be created until a <em>_stp_map_set_xxx</em> call. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>map</em> </td><td></td></tr> + <tr><td valign="top"></td><td valign="top"><em>key1</em> </td><td>first key </td></tr> + <tr><td valign="top"></td><td valign="top"><em>key2</em> </td><td>second key </td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00310">310</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="map_8h-source.html#l00074">map_root::c_key1</a>, <a class="el" href="map_8h-source.html#l00075">map_root::c_key2</a>, <a class="el" href="map_8h-source.html#l00073">map_root::c_keyhead</a>, <a class="el" href="map_8h-source.html#l00070">map_root::create</a>, <a class="el" href="runtime_8h-source.html#l00017">dbug</a>, <a class="el" href="map_8h-source.html#l00078">map_root::hashes</a>, <a class="el" href="map_8h-source.html#l00066">map_root::key</a>, <a class="el" href="map_8h-source.html#l00023">map_node::key1</a>, <a class="el" href="map_8h-source.html#l00024">map_node::key2</a>, <a class="el" href="map_8h-source.html#l00084">MAP</a>, <a class="el" href="map_8h-source.html#l00013">key_data::str</a>, and <a class="el" href="map_8h-source.html#l00012">key_data::val</a>. </td> + </tr> +</table> +<a class="anchor" name="a10" doxytag="map.c::_stp_map_key_str_str"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top">void _stp_map_key_str_str </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="mdname" nowrap> <em>map</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td class="md"></td> + <td class="md" nowrap>char * </td> + <td class="mdname" nowrap> <em>key1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td class="md"></td> + <td class="md" nowrap>char * </td> + <td class="mdname" nowrap> <em>key2</em></td> + </tr> + <tr> + <td class="md"></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Set the map's key to two strings. +<p> +This sets the current element based on a key of two strings. If the keys are not found, a new element will not be created until a <em>_stp_map_set_xxx</em> call. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>map</em> </td><td></td></tr> + <tr><td valign="top"></td><td valign="top"><em>key1</em> </td><td>first key </td></tr> + <tr><td valign="top"></td><td valign="top"><em>key2</em> </td><td>second key </td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00261">261</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="map_8h-source.html#l00074">map_root::c_key1</a>, <a class="el" href="map_8h-source.html#l00075">map_root::c_key2</a>, <a class="el" href="map_8h-source.html#l00073">map_root::c_keyhead</a>, <a class="el" href="map_8h-source.html#l00070">map_root::create</a>, <a class="el" href="runtime_8h-source.html#l00017">dbug</a>, <a class="el" href="map_8h-source.html#l00078">map_root::hashes</a>, <a class="el" href="map_8h-source.html#l00066">map_root::key</a>, <a class="el" href="map_8h-source.html#l00023">map_node::key1</a>, <a class="el" href="map_8h-source.html#l00024">map_node::key2</a>, <a class="el" href="map_8h-source.html#l00084">MAP</a>, and <a class="el" href="map_8h-source.html#l00013">key_data::str</a>. +<p> +Referenced by <a class="el" href="map_8c-source.html#l00399">_stp_map_key_str()</a>. </td> + </tr> +</table> +<a class="anchor" name="a3" doxytag="map.c::_stp_map_new"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> _stp_map_new </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">unsigned </td> + <td class="mdname" nowrap> <em>max_entries</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td class="md"></td> + <td class="md" nowrap>enum <a class="el" href="map_8h.html#a19">valtype</a> </td> + <td class="mdname" nowrap> <em>type</em></td> + </tr> + <tr> + <td class="md"></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Create a new map. +<p> +Maps must be created at module initialization time. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>max_entries</em> </td><td>The maximum number of entries allowed. Currently that number will be preallocated. If more entries are required, the oldest ones will be deleted. This makes it effectively a circular buffer. If max_entries is 0, there will be no maximum and entries will be allocated dynamically. </td></tr> + <tr><td valign="top"></td><td valign="top"><em>type</em> </td><td>Type of values stored in this map. </td></tr> + </table> +</dl> +<dl compact><dt><b>Returns:</b></dt><dd>A MAP on success or NULL on failure. </dd></dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00043">43</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="alloc_8h-source.html#l00043">_stp_valloc()</a>, <a class="el" href="runtime_8h-source.html#l00017">dbug</a>, <a class="el" href="map_8h-source.html#l00059">map_root::head</a>, <a class="el" href="map_8h-source.html#l00084">MAP</a>, <a class="el" href="map_8h-source.html#l00050">map_root::maxnum</a>, <a class="el" href="map_8h-source.html#l00081">map_root::membuf</a>, and <a class="el" href="map_8h-source.html#l00063">map_root::pool</a>. +<p> +Referenced by <a class="el" href="map_8c-source.html#l00753">_stp_list_new()</a>. </td> + </tr> +</table> +<a class="anchor" name="a16" doxytag="map.c::_stp_map_set_int64"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top">void _stp_map_set_int64 </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="mdname" nowrap> <em>map</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td class="md"></td> + <td class="md" nowrap>int64_t </td> + <td class="mdname" nowrap> <em>val</em></td> + </tr> + <tr> + <td class="md"></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Set the current element's value to an int64. +<p> +This sets the current element's value to an int64. The map must have been created to hold int64s using <a class="el" href="map_8c.html#a3">_stp_map_new()</a><p> +If the element doesn't exist, it is created. If no current element (key) is set for the map, this function does nothing. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>map</em> </td><td></td></tr> + <tr><td valign="top"></td><td valign="top"><em>val</em> </td><td>new value </td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00471">471</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="alloc_8h-source.html#l00028">_stp_calloc()</a>, <a class="el" href="map_8c-source.html#l00104">_stp_map_key_del()</a>, <a class="el" href="map_8h-source.html#l00070">map_root::create</a>, <a class="el" href="runtime_8h-source.html#l00017">dbug</a>, <a class="el" href="map_8h-source.html#l00059">map_root::head</a>, <a class="el" href="map_8h-source.html#l00022">map_node::hnode</a>, <a class="el" href="map_8h-source.html#l00066">map_root::key</a>, <a class="el" href="map_8h-source.html#l00021">map_node::lnode</a>, <a class="el" href="map_8h-source.html#l00084">MAP</a>, <a class="el" href="map_8h-source.html#l00050">map_root::maxnum</a>, <a class="el" href="map_8h-source.html#l00031">map_node_int64::n</a>, <a class="el" href="map_8h-source.html#l00056">map_root::no_wrap</a>, <a class="el" href="map_8h-source.html#l00063">map_root::pool</a>, and <a class="el" href="map_8h-source.html#l00032">map_node_int64::val</a>. +<p> +Referenced by <a class="el" href="map_8c-source.html#l00816">_stp_list_add_int64()</a>. </td> + </tr> +</table> +<a class="anchor" name="a20" doxytag="map.c::_stp_map_set_stat"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top">void _stp_map_set_stat </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="mdname" nowrap> <em>map</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td class="md"></td> + <td class="md" nowrap><a class="el" href="structstat.html">stat</a> * </td> + <td class="mdname" nowrap> <em>stats</em></td> + </tr> + <tr> + <td class="md"></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Set the current element's value to a stat. +<p> +This sets the current element's value to an stat struct. The map must have been created to hold stats using <em>_stp_map_new(xxx, STAT)</em>. This function would only be used if we wanted to set stats to something other than the normal initial values (count = 0, sum = 0, etc). It may be deleted if it doesn't turn out to be useful. <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="map_8c.html#a22">_stp_map_stat_add</a></dd></dl> +If the element doesn't exist, it is created. If no current element (key) is set for the map, this function does nothing. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>map</em> </td><td></td></tr> + <tr><td valign="top"></td><td valign="top"><em>stats</em> </td><td>pointer to stats struct. </td></tr> + </table> +</dl> +<dl compact><dt><b><a class="el" href="todo.html#_todo000002">Todo:</a></b></dt><dd>Histograms don't work yet. </dd></dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00633">633</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="alloc_8h-source.html#l00028">_stp_calloc()</a>, <a class="el" href="map_8c-source.html#l00104">_stp_map_key_del()</a>, <a class="el" href="map_8h-source.html#l00070">map_root::create</a>, <a class="el" href="runtime_8h-source.html#l00017">dbug</a>, <a class="el" href="map_8h-source.html#l00059">map_root::head</a>, <a class="el" href="map_8h-source.html#l00022">map_node::hnode</a>, <a class="el" href="map_8h-source.html#l00066">map_root::key</a>, <a class="el" href="map_8h-source.html#l00021">map_node::lnode</a>, <a class="el" href="map_8h-source.html#l00084">MAP</a>, <a class="el" href="map_8h-source.html#l00050">map_root::maxnum</a>, <a class="el" href="map_8h-source.html#l00041">map_node_stat::n</a>, <a class="el" href="map_8h-source.html#l00056">map_root::no_wrap</a>, <a class="el" href="map_8h-source.html#l00063">map_root::pool</a>, and <a class="el" href="map_8h-source.html#l00042">map_node_stat::stats</a>. +<p> +Referenced by <a class="el" href="map_8c-source.html#l00713">_stp_map_stat_add()</a>. </td> + </tr> +</table> +<a class="anchor" name="a18" doxytag="map.c::_stp_map_set_str"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top">void _stp_map_set_str </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="mdname" nowrap> <em>map</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td class="md"></td> + <td class="md" nowrap>char * </td> + <td class="mdname" nowrap> <em>val</em></td> + </tr> + <tr> + <td class="md"></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Set the current element's value to a string. +<p> +This sets the current element's value to an string. The map must have been created to hold int64s using <em>_stp_map_new(xxx, STRING)</em><p> +If the element doesn't exist, it is created. If no current element (key) is set for the map, this function does nothing. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>map</em> </td><td></td></tr> + <tr><td valign="top"></td><td valign="top"><em>val</em> </td><td>new string </td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00548">548</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="alloc_8h-source.html#l00012">_stp_alloc()</a>, <a class="el" href="alloc_8h-source.html#l00028">_stp_calloc()</a>, <a class="el" href="alloc_8h-source.html#l00057">_stp_free()</a>, <a class="el" href="map_8c-source.html#l00104">_stp_map_key_del()</a>, <a class="el" href="map_8h-source.html#l00070">map_root::create</a>, <a class="el" href="runtime_8h-source.html#l00017">dbug</a>, <a class="el" href="map_8h-source.html#l00059">map_root::head</a>, <a class="el" href="map_8h-source.html#l00022">map_node::hnode</a>, <a class="el" href="map_8h-source.html#l00066">map_root::key</a>, <a class="el" href="map_8h-source.html#l00021">map_node::lnode</a>, <a class="el" href="map_8h-source.html#l00084">MAP</a>, <a class="el" href="map_8h-source.html#l00050">map_root::maxnum</a>, <a class="el" href="map_8h-source.html#l00036">map_node_str::n</a>, <a class="el" href="map_8h-source.html#l00056">map_root::no_wrap</a>, <a class="el" href="map_8h-source.html#l00063">map_root::pool</a>, and <a class="el" href="map_8h-source.html#l00037">map_node_str::str</a>. +<p> +Referenced by <a class="el" href="map_8c-source.html#l00805">_stp_list_add_str()</a>. </td> + </tr> +</table> +<a class="anchor" name="a6" doxytag="map.c::_stp_map_start"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top">struct <a class="el" href="structmap__node.html">map_node</a>* _stp_map_start </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="mdname1" valign="top" nowrap> <em>map</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Get the first element in a map. +<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>map</em> </td><td></td></tr> + </table> +</dl> +<dl compact><dt><b>Returns:</b></dt><dd>a pointer to the first element. This is typically used with <a class="el" href="map_8c.html#a7">_stp_map_iter()</a>. See the <a class="el" href="map_8h.html#a8">foreach()</a> macro for typical usage. It probably does what you want anyway. </dd></dl> +<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="map_8h.html#a8">foreach</a> </dd></dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00149">149</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="runtime_8h-source.html#l00017">dbug</a>, <a class="el" href="map_8h-source.html#l00059">map_root::head</a>, and <a class="el" href="map_8h-source.html#l00084">MAP</a>. </td> + </tr> +</table> +<a class="anchor" name="a22" doxytag="map.c::_stp_map_stat_add"></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top">void _stp_map_stat_add </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="structmap__root.html">MAP</a> </td> + <td class="mdname" nowrap> <em>map</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td class="md"></td> + <td class="md" nowrap>int64_t </td> + <td class="mdname" nowrap> <em>val</em></td> + </tr> + <tr> + <td class="md"></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + </table> + </td> + </tr> +</table> +<table cellspacing="5" cellpadding="0" border="0"> + <tr> + <td> + + </td> + <td> + +<p> +Add to the current element's statistics. +<p> +Increments the statistics counter by one and the sum by <em>val</em>. Adjusts minimum, maximum, and histogram.<p> +If the element doesn't exist, it is created. If no current element (key) is set for the map, this function does nothing. <dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign="top"></td><td valign="top"><em>map</em> </td><td></td></tr> + <tr><td valign="top"></td><td valign="top"><em>val</em> </td><td>value to add to the statistics </td></tr> + </table> +</dl> +<dl compact><dt><b><a class="el" href="todo.html#_todo000003">Todo:</a></b></dt><dd>Histograms don't work yet. </dd></dl> + +<p> +Definition at line <a class="el" href="map_8c-source.html#l00713">713</a> of file <a class="el" href="map_8c-source.html">map.c</a>. +<p> +References <a class="el" href="map_8c-source.html#l00633">_stp_map_set_stat()</a>, <a class="el" href="map_8h-source.html#l00005">stat::count</a>, <a class="el" href="map_8h-source.html#l00070">map_root::create</a>, <a class="el" href="runtime_8h-source.html#l00017">dbug</a>, <a class="el" href="map_8h-source.html#l00066">map_root::key</a>, <a class="el" href="map_8h-source.html#l00084">MAP</a>, <a class="el" href="map_8h-source.html#l00007">stat::max</a>, <a class="el" href="map_8h-source.html#l00007">stat::min</a>, <a class="el" href="map_8h-source.html#l00042">map_node_stat::stats</a>, and <a class="el" href="map_8h-source.html#l00006">stat::sum</a>. </td> + </tr> +</table> +<hr size="1"><address style="align: right;"><small>Generated on Wed Mar 9 13:21:28 2005 for SystemTap by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address> +</body> +</html> |