[riot-notifications] [RIOT-OS/RIOT] core: add functionality to check queue state of another thread (#16174)

Marian Buschsieweke notifications at github.com
Fri May 7 11:03:17 CEST 2021

@maribu commented on this pull request.

>   *
  * @return Number of messages available in our queue on success
  * @return -1, if no caller's message queue is initialized
 int msg_avail(void);
+ * @brief Get maximum capacity of a thread's queue length
+ *
+ * @return Number of total messages that fit in the queue of @p pid on success
+ * @return -1, if no caller's message queue is initialized
+ */
+int msg_queue_capacity(kernel_pid_t pid);

Maybe rename to `msg_queue_capacity_thread()` for naming consistency? And add 

static inline int msg_queue_capacity(void)
    retrurn msg_queue_capacity_thread(thread_getpid());

Even if there is no obvious use case for this now, it is hard to change APIs later on.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210507/acc1427a/attachment.htm>

More information about the notifications mailing list