Merge remote-tracking branch 'origin/feature/queue_isr_inject_access_lock' into development

This commit is contained in:
John Wellbelove 2019-02-26 20:27:27 +01:00
commit 302a82baa6
3 changed files with 11 additions and 6 deletions

View File

@ -609,7 +609,7 @@ namespace etl
//*************************************************************************
/// The constructor that is called from derived classes.
//*************************************************************************
iqueue_spsc_locked(T* p_buffer_, size_type max_size_, etl::ifunction<void>& lock_, etl::ifunction<void>& unlock_)
iqueue_spsc_locked(T* p_buffer_, size_type max_size_, const etl::ifunction<void>& lock_, const etl::ifunction<void>& unlock_)
: base_t(p_buffer_, max_size_)
, lock(lock_)
, unlock(unlock_)
@ -622,8 +622,8 @@ namespace etl
iqueue_spsc_locked(const iqueue_spsc_locked&);
iqueue_spsc_locked& operator =(const iqueue_spsc_locked&);
etl::ifunction<void>& lock; ///< The callback that locks interrupts.
etl::ifunction<void>& unlock; ///< The callback that unlocks interrupts.
const etl::ifunction<void>& lock; ///< The callback that locks interrupts.
const etl::ifunction<void>& unlock; ///< The callback that unlocks interrupts.
};
//***************************************************************************
@ -652,8 +652,9 @@ namespace etl
//*************************************************************************
/// Default constructor.
//*************************************************************************
queue_spsc_locked(etl::ifunction<void>& lock,
etl::ifunction<void>& unlock)
queue_spsc_locked(const etl::ifunction<void>& lock,
const etl::ifunction<void>& unlock)
: base_t(reinterpret_cast<T*>(&buffer[0]), MAX_SIZE, lock, unlock)
{
}

View File

@ -39,7 +39,7 @@ SOFTWARE.
#define ETL_VERSION_MAJOR 14
#define ETL_VERSION_MINOR 13
#define ETL_VERSION_PATCH 0
#define ETL_VERSION_PATCH 1
#define ETL_VERSION ETL_STRINGIFY(ETL_VERSION_MAJOR) ETL_STRINGIFY(ETL_VERSION_MINOR) ETL_STRINGIFY(ETL_VERSION_PATCH)
#define ETL_VERSION_W ETL_WIDE_STRING(ETL_CONCAT(ETL_CONCAT(ETL_VERSION_MAJOR, ETL_VERSION_MINOR), ETL_VERSION_PATCH))

View File

@ -1,3 +1,7 @@
===============================================================================
14.13.1
Modified etl::queue_spsc_locked parameters to 'const'.
===============================================================================
14.13.0
Added etl::queue_spsc_locked with injected locking functions.