aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/various/cpp_wrappers/ch.hpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/os/various/cpp_wrappers/ch.hpp b/os/various/cpp_wrappers/ch.hpp
index 611040240..b1f939de3 100644
--- a/os/various/cpp_wrappers/ch.hpp
+++ b/os/various/cpp_wrappers/ch.hpp
@@ -598,12 +598,28 @@ namespace chibios_rt {
public:
/**
* @brief Thread reference constructor.
+ * @note Do not call this version directly, this constructor is empty
+ * and is here only to do nothing when an object of this kind
+ * is declared then assigned.
+ * @note Automatic instances of this object are not initialized
+ * because this constructor, this is intentional.
*
* @param[in] tp the target thread
*
* @init
*/
- ThreadReference(thread_t *tp = nullptr) : thread_ref(tp) {
+ ThreadReference(void) {
+
+ }
+
+ /**
+ * @brief Thread reference constructor.
+ *
+ * @param[in] tp the target thread
+ *
+ * @init
+ */
+ ThreadReference(thread_t *tp) : thread_ref(tp) {
}