Add yet more source code documentation.
[adu.git] / adu.h
diff --git a/adu.h b/adu.h
index 31050444a6ef74dc8790b003c0376a49a78334aa..c67dd6bc657b910293eba97b43138d3d05ed781b 100644 (file)
--- a/adu.h
+++ b/adu.h
@@ -4,7 +4,7 @@
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
 
-/** \file adu.h Global definitions. */
+/** \file adu.h \brief Global definitions. */
 
 #include <sys/stat.h>
 #include <fcntl.h>
 /** Log messages with lower priority than that will not be compiled in. */
 #define COMPILE_TIME_LOGLEVEL 0
 
+/**
+ *  A variant of static inline that requires the object being documented.
+ *
+ * If doxygen finds the \p static keyword in any context, that part will not be
+ * included in the documentation. However, we want static inline functions in
+ * header files to be documented while static functions in C files and
+ * statically declared variables should be left out. As a workaround for this
+ * flaw we use \p _static_inline_ for static inline functions declared in
+ * header files.
+ */
+#define _static_inline_ static inline
+
 /** \cond */
 #if DEBUG > COMPILE_TIME_LOGLEVEL
 #define DEBUG_LOG(f,...) __log(DEBUG, "%s: " f, __FUNCTION__, ## __VA_ARGS__)
@@ -157,7 +169,7 @@ extern struct select_args_info select_conf;
  *
  * \sa osl_compare_func, osl_hash_compare().
  */
-static inline int uint64_compare(const struct osl_object *obj1,
+_static_inline_ int uint64_compare(const struct osl_object *obj1,
                const struct osl_object *obj2)
 {
        uint64_t d1 = read_u64((const char *)obj1->data);
@@ -180,7 +192,7 @@ static inline int uint64_compare(const struct osl_object *obj1,
  * equal, the address of \a obj1 and \a obj2 are compared. So this compare function
  * returns zero if and only if \a obj1 and \a obj2 point to the same memory area.
  */
-static inline int size_compare(const struct osl_object *obj1, const struct osl_object *obj2)
+_static_inline_ int size_compare(const struct osl_object *obj1, const struct osl_object *obj2)
 {
        uint64_t d1 = *(uint64_t *)obj1->data;
        uint64_t d2 = *(uint64_t *)obj2->data;