parent
0f67a6c00c
commit
215f77b836
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user