Moves the #if guards to before the comments (#690)

Fixes #683
This commit is contained in:
Thomas Fike 2022-01-08 12:53:21 -07:00 committed by GitHub
parent 0f67a6c00c
commit 215f77b836
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,6 +101,7 @@ static inline uint queue_get_level(queue_t *q) {
return level; return level;
} }
#if PICO_QUEUE_MAX_LEVEL
/*! \brief Returns the highest level reached by the specified queue since it was created /*! \brief Returns the highest level reached by the specified queue since it was created
* or since the max level was reset * or since the max level was reset
* \ingroup queue * \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 * \param q Pointer to a queue_t structure, used as a handle
* \return Maximum level of the queue * \return Maximum level of the queue
*/ */
#if PICO_QUEUE_MAX_LEVEL
static inline uint queue_get_max_level(queue_t *q) { static inline uint queue_get_max_level(queue_t *q) {
return q->max_level; return q->max_level;
} }
#endif #endif
#if PICO_QUEUE_MAX_LEVEL
/*! \brief Reset the highest level reached of the specified queue. /*! \brief Reset the highest level reached of the specified queue.
* \ingroup queue * \ingroup queue
* *
* \param q Pointer to a queue_t structure, used as a handle * \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) { static inline void queue_reset_max_level(queue_t *q) {
uint32_t save = spin_lock_blocking(q->core.spin_lock); uint32_t save = spin_lock_blocking(q->core.spin_lock);
q->max_level = queue_get_level_unsafe(q); q->max_level = queue_get_level_unsafe(q);