Hoa Nguyen has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/32963 )
Change subject: base: Tag API methods in coroutine.hh
......................................................................
base: Tag API methods in coroutine.hh
Change-Id: Ifd0aade13b0979d8f8433577be7f019d83406e6a
Signed-off-by: Hoa Nguyen <hoangu...@ucdavis.edu>
---
M src/base/coroutine.hh
1 file changed, 27 insertions(+), 1 deletion(-)
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:
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/32963
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ifd0aade13b0979d8f8433577be7f019d83406e6a
Gerrit-Change-Number: 32963
Gerrit-PatchSet: 1
Gerrit-Owner: Hoa Nguyen <hoangu...@ucdavis.edu>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s