[En-Nut-Discussion] Re: Multiple sockets, and threads

Stephen Noftall stephenn at lcsaudio.com
Wed Apr 2 18:27:49 CEST 2003


Hi Robert and Jason;

I think I have tracked it down. It appears that the transmit thread was
getting an error when it did a NutTcpSend(), and the error number was
"ENOBUFS", so this is beginning to make sense.

What I think was happening was that as soon as the transmitter and receiver
started to really get a work out, Ethernut ran out of buffer space and
started to error out. I also noticed that the TWI interrupt would also
occasionally be held off for > 50mS.

So I am going to try a NutThreadYield() in there whenever the ENOBUFS error
is returned, and see if that helps. There is around 6K B left, but does it
use heap memory?

Robert, I do have my debug telnet socket as a different name as the main
socket, so I should be ok. My main socket is "sock" so maybe it has a
problem with Ethernut's internal socks? Unlikely, but will change the name
to see if it is ok. As far as I know, having globals with the same name will
probably cause problems with the linker, but I do not know for sure.

Thanks for the help!

Stephen Noftall




More information about the En-Nut-Discussion mailing list