[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/4] lwip: Call if_change_flags() inside a thread-safe contex
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 4/4] lwip: Call if_change_flags() inside a thread-safe context |
Date: |
Fri, 3 May 2019 00:02:00 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
Joan Lledó, le jeu. 02 mai 2019 11:55:02 +0200, a ecrit:
> + uint16_t oldflags;
> + struct if_change_flags_args *args = (struct if_change_flags_args *) arg;
In C, there is no need to explicit the cast from void*.
> + ifc = netif_get_state (args->netif);
> +
> + if (ifc == NULL)
> + {
> + /* The user provided no interface */
> + errno = EINVAL;
Errno is a per-thread variable, you can not propagate the error this
way. You can for instance add an int field to if_change_flags_args, to
read it from if_change_flags and freeing it there.
Samuel
[PATCH 4/4] lwip: Call if_change_flags() inside a thread-safe context, Joan Lledó, 2019/05/02
- Re: [PATCH 4/4] lwip: Call if_change_flags() inside a thread-safe context,
Samuel Thibault <=
[PATCH 1/4] lwip: Fix bug: Remove unsupported flags when calling send()., Joan Lledó, 2019/05/02
- Re: [PATCH 1/4] lwip: Fix bug: Remove unsupported flags when calling send()., Samuel Thibault, 2019/05/02
- Re: [PATCH 1/4] lwip: Fix bug: Remove unsupported flags when calling send()., Samuel Thibault, 2019/05/02
- Re: [PATCH 1/4] lwip: Fix bug: Remove unsupported flags when calling send()., Joan Lledó, 2019/05/03
- Re: [PATCH 1/4] lwip: Fix bug: Remove unsupported flags when calling send()., Samuel Thibault, 2019/05/03
- [PATCH 2/2] lwip: Fix bug: Clear MSG_NOSIGNAL flag when calling send()., Joan Lledó, 2019/05/04
- [PATCH 2/2] lwip: Fix bug: Clear MSG_NOSIGNAL flag when calling send()., Joan Lledó, 2019/05/04
- Re: [PATCH 2/2] lwip: Fix bug: Clear MSG_NOSIGNAL flag when calling send()., Samuel Thibault, 2019/05/04