Add inline to set queue user defined link field Topic is solved

Use this forum for requesting small changes in ChibiOS. Large changes should be discussed in the development forum. This forum is NOT for support.
User avatar
Posts: 171
Joined: Sun Jun 12, 2016 4:10 am
Location: Sydney, Australia
Has thanked: 61 times
Been thanked: 50 times

Add inline to set queue user defined link field  Topic is solved

Postby FXCoder » Thu Jun 14, 2018 9:53 am

Normally when using hal_queues the user defined link is set when the queue object is initialized.
However, if the user defined link field needs to be updated while the queue is in use a small inline is needed.
For example when using combined buffer/queue objects that can be chained dynamically using the user defined link field.

Maybe this would be a useful addition to hal_queues.h...

Code: Select all

 * @brief   Sets the queue application-defined link.
 * @note    This function can be called in any context.
 * @param[in] qp        pointer to a @p io_queue_t structure
 * @param[in] lk        The application-defined link.
 * @special
#define qSetLink(qp, lk) ((qp)->q_link = lk)

User avatar
Site Admin
Posts: 11787
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 503 times
Been thanked: 427 times

Re: Add inline to set queue user defined link field

Postby Giovanni » Fri Jun 15, 2018 10:14 am


Added to trunk.


Return to “Small Change Requests”

Who is online

Users browsing this forum: No registered users and 0 guests