Small optimization to ThreadReference.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11971 110e8d01-0319-4d1e-a829-52ad28d1bb01
This commit is contained in:
Giovanni Di Sirio 2018-04-28 16:07:11 +00:00
parent fea81eee77
commit 79ca260007
1 changed files with 17 additions and 1 deletions

View File

@ -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) {
}