summaryrefslogtreecommitdiffstats
path: root/runtime/map.h
diff options
context:
space:
mode:
authorhunt <hunt>2005-03-29 18:07:58 +0000
committerhunt <hunt>2005-03-29 18:07:58 +0000
commite32551b18f4560056d2d482f5e1505b1b98fa82a (patch)
tree4e9e07a9b46a4fd5dea27732571cbb04c0ef5dee /runtime/map.h
parent13b35bb112459702e7371ecc89d7deb789818a86 (diff)
downloadsystemtap-steved-e32551b18f4560056d2d482f5e1505b1b98fa82a.tar.gz
systemtap-steved-e32551b18f4560056d2d482f5e1505b1b98fa82a.tar.xz
systemtap-steved-e32551b18f4560056d2d482f5e1505b1b98fa82a.zip
*** empty log message ***
Diffstat (limited to 'runtime/map.h')
-rw-r--r--runtime/map.h40
1 files changed, 25 insertions, 15 deletions
diff --git a/runtime/map.h b/runtime/map.h
index 006c560b..9e30a926 100644
--- a/runtime/map.h
+++ b/runtime/map.h
@@ -1,6 +1,12 @@
+#ifndef _MAP_H_
+#define _MAP_H_
/* -*- linux-c -*- */
+
/** @file map.h
- * @brief Header file for maps and lists
+ * @brief Header file for maps and lists
+ */
+/** @addtogroup maps
+ * @{
*/
#include <linux/types.h>
@@ -152,20 +158,7 @@ typedef struct map_root *MAP;
_stp_map_set_int64 (map, (int64_t)(val)); \
})
-/** Macro to call the proper _stp_list_add function based on the
- * types of the argument.
- * @note May cause compiler warning on some GCCs
- */
-#define _stp_list_add(map, val) \
- ({ \
- if (__builtin_types_compatible_p (typeof (val), char[])) \
- _stp_list_add_str (map, (char *)(val)); \
- else \
- _stp_list_add_int64 (map, (int64_t)(val)); \
- })
-
-
-/** Loop through all elements of a map.
+/** Loop through all elements of a map or list.
* @param map
* @param ptr pointer to a map_node_stat, map_node_int64 or map_node_str
*
@@ -177,3 +170,20 @@ typedef struct map_root *MAP;
for (ptr = (typeof(ptr))_stp_map_start(map); ptr; \
ptr = (typeof(ptr))_stp_map_iter (map, (struct map_node *)ptr))
+/** @} */
+
+/** @ingroup lists
+ * @brief Macro to call the proper _stp_list_add function based on the
+ * types of the argument.
+ *
+ * @note May cause compiler warning on some GCCs
+ */
+#define _stp_list_add(map, val) \
+ ({ \
+ if (__builtin_types_compatible_p (typeof (val), char[])) \
+ _stp_list_add_str (map, (char *)(val)); \
+ else \
+ _stp_list_add_int64 (map, (int64_t)(val)); \
+ })
+
+#endif /* _MAP_H_ */