[riot-notifications] [RIOT-OS/RIOT] pkg/lwip / pkg/tinydtls: use new mbox_avail() / mbox_unset() function. (#15484)

Kaspar Schleiser notifications at github.com
Fri Nov 20 14:20:19 CET 2020


@kaspar030 commented on this pull request.



> @@ -185,6 +185,17 @@ static inline size_t mbox_avail(mbox_t *mbox)
     return cib_avail(&mbox->cib);
 }
 
+/**
+ * @brief   Unset's the mbox, effectively deinitializing invalidating it.

both deinitializing and invalidating? Comma missing? :)

This leaks a possibly supplied queue. Maybe better call it mbox_release_queue?
The mbox actually works without queue, it'd just be synchronous from that point on.

This is also a bit dangerous, if this is called with messages in the queue, they get lost. If there's a sender that was previously waiting, it would be stuck there until the queue transitions from full to empty again.

Why is this needed?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15484#pullrequestreview-535419846
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201120/433fd7cf/attachment.htm>


More information about the notifications mailing list