base: Tag API methods in coroutine.hh

Change-Id: Ifd0aade13b0979d8f8433577be7f019d83406e6a
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32963
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
diff --git a/src/base/coroutine.hh b/src/base/coroutine.hh
index 4ac1a65..b4c3474 100644
--- a/src/base/coroutine.hh
+++ b/src/base/coroutine.hh
@@ -93,6 +93,8 @@
          *
          * This method is generated only if the coroutine returns
          * a value (Ret != void)
+         *
+         * @ingroup api_coroutine
          */
         template <typename T = Ret>
         CallerType&
@@ -109,6 +111,8 @@
          *
          * This method is generated only if the coroutine doesn't
          * return a value (Ret = void)
+         *
+         * @ingroup api_coroutine
          */
         template <typename T = Ret>
         typename std::enable_if<std::is_same<T, void>::value,
@@ -128,6 +132,8 @@
          * from the caller.
          *
          * @return arg coroutine argument
+         *
+         * @ingroup api_coroutine
          */
         template <typename T = Arg>
         typename std::enable_if<!std::is_same<T, void>::value, T>::type
@@ -149,9 +155,14 @@
         RetChannel retChannel;
     };
 
+    /**
+     * @ingroup api_coroutine
+     * @{
+     */
     Coroutine() = delete;
     Coroutine(const Coroutine& rhs) = delete;
     Coroutine& operator=(const Coroutine& rhs) = delete;
+    /** @} */ // end of api_coroutine
 
     /**
      * Coroutine constructor.
@@ -167,6 +178,8 @@
      * @param f task run by the coroutine
      * @param run_coroutine set to false to disable running the coroutine
      *                      immediately after it is created
+     *
+     * @ingroup api_coroutine
      */
     Coroutine(std::function<void(CallerType&)> f, bool run_coroutine = true)
       : Fiber(), task(f), caller(*this)
@@ -176,6 +189,9 @@
             this->call();
     }
 
+    /**
+     * @ingroup api_coroutine
+     */
     virtual ~Coroutine() {}
 
   public:
@@ -187,6 +203,8 @@
      *
      * This method is generated only if the coroutine takes
      * arguments (Arg != void)
+     *
+     * @ingroup api_coroutine
      */
     template <typename T = Arg>
     Coroutine&
@@ -203,6 +221,8 @@
      *
      * This method is generated only if the coroutine takes
      * no arguments. (Arg = void)
+     *
+     * @ingroup api_coroutine
      */
     template <typename T = Arg>
     typename std::enable_if<std::is_same<T, void>::value, Coroutine>::type&
@@ -221,6 +241,8 @@
      * from the coroutine.
      *
      * @return ret yielded value
+     *
+     * @ingroup api_coroutine
      */
     template <typename T = Ret>
     typename std::enable_if<!std::is_same<T, void>::value, T>::type
@@ -236,7 +258,11 @@
         return ret;
     }
 
-    /** Check if coroutine is still running */
+    /**
+     * Check if coroutine is still running
+     *
+     * @ingroup api_coroutine
+     */
     operator bool() const { return !this->finished(); }
 
   private: