On 03.10.2018 14:24, goldsi...@gmx.de wrote:
On 03.10.2018 10:42, matteo.c...@alice.it wrote:
[..]

My project is based on a RTOS with several tasks and each of them manages a socket. Because the errno is a global variable, the errno contains the last error reported by a socket, so the error contained in the errno could be overwritten in the instance of checking the errno.


In a multithreaded environment, 'errno' has to be a thread-local variable, not a global one.

A this point my question is if there is a method for associate the EWOULDBLOCK error to a specific socket.


Hmm, no, I don't know of any, sorry.

But if you could provide us with information about how this is implemented in other systems (if you find any), I'd be happy to implement this for lwIP. I know the current situation might not be optimal for small embedded sytems (implementing thread-local storage), but I'm really trying to follow the socket specs here...

Simon
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to