This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

TCP/IP stack and threading question


Hi,
I am trying to write a fairly straight forward eCos app and I am trouble
understanding how the TCP/IP stack should behave with application threads
(or vice versa).

I am using the FreeBSD TCP/IP stack and I have written a small C++
application. My app has a cyg_user_start function which currently creates
and resumes a single thread. In my thread I successfully initialise the
network interface with init_all_network_interfaces(); and then go into a
loop which is (at the moment at least) a simple CLI (reading commands from
the serial port and replies to it).

Now, what I have observed is that when I am in my thread's loop I can't ping
to the eCos machine (even though the link is up). If I exit from my thread, 
I can ping it no problem.

So, what am I doing wrong here? Do I need to have an application thread that
handles the "background" TCP/IP stuff link answering ping? I was assuming
this stuff would just work but now I suspect I've misunderstood something
fundamental.
Any advice would be grately appreciated.
Thanks in advance,
Best regards,
Tim Hatton


-- 
View this message in context: http://www.nabble.com/TCP-IP-stack-and-threading-question-tf1972767.html#a5414828
Sent from the Sourceware - ecos-discuss forum at Nabble.com.


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]