[..]
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
|