[riot-notifications] [RIOT-OS/RIOT] sys/net/gnrc/tx_sync: new module (#15694)

Martine Lenders notifications at github.com
Tue Jan 12 09:39:19 CET 2021


@miri64 commented on this pull request.



> +/**
+ * @brief   Signal TX completion via the given tx sync packet snip
+ *
+ * @pre     Module gnrc_netttype_tx_sync is sued
+ * @pre     `pkt->type == GNRC_NETTYPE_TX_SYNC`
+ *
+ * @param   The tx sync packet snip of the packet that was transmitted
+ */
+static inline void gnrc_tx_complete(gnrc_pktsnip_t *pkt)
+{
+    assert(IS_USED(MODULE_GNRC_TX_SYNC) && (pkt->type == GNRC_NETTYPE_TX_SYNC));
+    /* Allow for multiple waiters by just unlocking the mutex until all
+     * blocked threads have resumed */
+    gnrc_tx_sync_t *sync = pkt->data;
+    do {
+        mutex_unlock(&sync->signal);

> Which API do you refer to by `signal`?

I referred to your member name ;-)

-- 
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/15694#discussion_r555596052
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210112/ba86eb1e/attachment.htm>


More information about the notifications mailing list