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]

Re: TCP/IP stack and threading question


Tim Hatton wrote:
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.

What device are you using to read commands from the serial port?


--
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

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