aboutsummaryrefslogtreecommitdiffstats
path: root/os/various
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2018-04-28 16:07:11 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2018-04-28 16:07:11 +0000
commit79ca26000702cecc67464421f717b74cc6f17dbb (patch)
tree6f2ab7462c039f242eac8e8eacc8b583d856efe9 /os/various
parentfea81eee7795e769c1e37837d555cab3c6a0a14e (diff)
downloadChibiOS-79ca26000702cecc67464421f717b74cc6f17dbb.tar.gz
ChibiOS-79ca26000702cecc67464421f717b74cc6f17dbb.tar.bz2
ChibiOS-79ca26000702cecc67464421f717b74cc6f17dbb.zip
Small optimization to ThreadReference.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11971 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/various')
-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) {
}