diff options
author | hunt <hunt> | 2005-03-29 18:07:58 +0000 |
---|---|---|
committer | hunt <hunt> | 2005-03-29 18:07:58 +0000 |
commit | e32551b18f4560056d2d482f5e1505b1b98fa82a (patch) | |
tree | 4e9e07a9b46a4fd5dea27732571cbb04c0ef5dee /runtime/map.c | |
parent | 13b35bb112459702e7371ecc89d7deb789818a86 (diff) | |
download | systemtap-steved-e32551b18f4560056d2d482f5e1505b1b98fa82a.tar.gz systemtap-steved-e32551b18f4560056d2d482f5e1505b1b98fa82a.tar.xz systemtap-steved-e32551b18f4560056d2d482f5e1505b1b98fa82a.zip |
*** empty log message ***
Diffstat (limited to 'runtime/map.c')
-rw-r--r-- | runtime/map.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/runtime/map.c b/runtime/map.c index 0942fdaa..936383be 100644 --- a/runtime/map.c +++ b/runtime/map.c @@ -1,8 +1,14 @@ +#ifndef _MAP_C_ +#define _MAP_C_ + /* -*- linux-c -*- */ /** @file map.c * @brief Implements maps (associative arrays) and lists */ +#include "map.h" +#include "alloc.c" + static int map_sizes[] = { sizeof(struct map_node_int64), sizeof(struct map_node_stat), @@ -33,6 +39,11 @@ static unsigned mixed_hash(const char *key1, long key2) return hash_long((unsigned long)(hash ^ key2), HASH_TABLE_BITS); } +/** @addtogroup maps + * Implements maps (associative arrays) and lists + * @{ + */ + /** Create a new map. * Maps must be created at module initialization time. * @param max_entries The maximum number of entries allowed. Currently that number will @@ -766,8 +777,16 @@ void _stp_map_stat_add(MAP map, int64_t val) /* histogram */ } +/** @} */ + /********************** List Functions *********************/ +/** @addtogroup lists + * Lists are special cases of maps. + * @b Example: + * @include list.c + * @{ */ + /** Create a new list. * 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. @@ -857,3 +876,5 @@ inline int _stp_list_size(MAP map) { return map->num; } +/** @} */ +#endif /* _MAP_C_ */ |