[riot-notifications] [RIOT-OS/RIOT] net/gcoap: support DTLS (#15549)

János Brodbeck notifications at github.com
Wed May 26 14:25:25 CEST 2021


@janosbrodbeck commented on this pull request.



> +        /* Remove all memos of the concerned session. TODO: oberservable memos! */
+        for (int i = 0; i < CONFIG_GCOAP_REQ_WAITING_MAX; i++) {
+            if (_coap_state.open_reqs[i].state == GCOAP_MEMO_UNUSED) {

Not 100% sure, from looking into code I didn't see locking when memos were set to unused. Since no moving or overwriting happens and no other* thread could access this memo I would say it's safe without.

\* This path occurs when the remote peer closed the session, so we are already in the receiver thread. If context switch happens to a sending thread, we would only create a new memo and not edit existing ones.

-- 
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/15549#discussion_r639674319
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210526/c3ff921b/attachment.htm>


More information about the notifications mailing list