Skip to content

gnrc_sock: provide asynchronous event implementation#8236

Closed
miri64 wants to merge 12 commits intoRIOT-OS:masterfrom
miri64:gnrc_sock/feat/async
Closed

gnrc_sock: provide asynchronous event implementation#8236
miri64 wants to merge 12 commits intoRIOT-OS:masterfrom
miri64:gnrc_sock/feat/async

Conversation

@miri64
Copy link
Member

@miri64 miri64 commented Dec 11, 2017

This provides an implementation for GNRC for the asynchronous event management for sock as provided in #8149.

@miri64 miri64 added GNRC Area: network Area: Networking Type: new feature The issue requests / The PR implemements a new feature for RIOT labels Dec 11, 2017
gnrc_sock_reg_t *reg = ctx;

if (mbox_try_put(&reg->mbox, &msg) < 1) {
DEBUG("gnrc_sock: dropped message to %p (was full)\n", mbox);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably this line should be:

DEBUG("gnrc_sock: dropped message to %p (was full)\n", (void *)&reg->mbox);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yepp.

#include <stdbool.h>
#include <stdint.h>

#include "event.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably should be:

#ifdef SOCK_HAS_ASYNC
#include "event.h"
#endif

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't hurt, though it is not necessary

@rfuentess
Copy link
Contributor

This is more a memo for myself.

I was testing tinyDTLS with this PR when I found myself on scenario explained on PR #8986. Oddly, without the assert being compiled my implementation was running (2 timeouts events plus the sock event).

Anyway, after applying the fix, I got a new issue where Segmentation fault (core dumped) happens after _netapi_cb() is called. This is only happening with my implementation.

I'll try to replicate my issue without tinydtls in the following days.

@stale
Copy link

stale bot commented Aug 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

@stale stale bot added the State: stale State: The issue / PR has no activity for >185 days label Aug 10, 2019
@miri64
Copy link
Member Author

miri64 commented Aug 10, 2019

Yepp, can be closed for now, as there is a new iteration of asynchronous sock: #11723

@stale stale bot removed the State: stale State: The issue / PR has no activity for >185 days label Aug 10, 2019
@miri64 miri64 closed this Aug 10, 2019
@miri64 miri64 deleted the gnrc_sock/feat/async branch August 10, 2019 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: network Area: Networking State: waiting for other PR State: The PR requires another PR to be merged first Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants