From 215f77b83635255928fe4e86a6bb0cf466c55fe3 Mon Sep 17 00:00:00 2001 From: Thomas Fike Date: Sat, 8 Jan 2022 12:53:21 -0700 Subject: [PATCH] Moves the #if guards to before the comments (#690) Fixes #683 --- src/common/pico_util/include/pico/util/queue.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/pico_util/include/pico/util/queue.h b/src/common/pico_util/include/pico/util/queue.h index 097578a..eb71e36 100644 --- a/src/common/pico_util/include/pico/util/queue.h +++ b/src/common/pico_util/include/pico/util/queue.h @@ -101,6 +101,7 @@ static inline uint queue_get_level(queue_t *q) { return level; } +#if PICO_QUEUE_MAX_LEVEL /*! \brief Returns the highest level reached by the specified queue since it was created * or since the max level was reset * \ingroup queue @@ -108,18 +109,17 @@ static inline uint queue_get_level(queue_t *q) { * \param q Pointer to a queue_t structure, used as a handle * \return Maximum level of the queue */ -#if PICO_QUEUE_MAX_LEVEL static inline uint queue_get_max_level(queue_t *q) { return q->max_level; } #endif +#if PICO_QUEUE_MAX_LEVEL /*! \brief Reset the highest level reached of the specified queue. * \ingroup queue * * \param q Pointer to a queue_t structure, used as a handle */ -#if PICO_QUEUE_MAX_LEVEL static inline void queue_reset_max_level(queue_t *q) { uint32_t save = spin_lock_blocking(q->core.spin_lock); q->max_level = queue_get_level_unsafe(q);